removed EndPoint.isBuffered

This commit is contained in:
Greg Wilkins 2011-11-10 13:15:41 +11:00
parent 144195d435
commit 629b6360de
7 changed files with 22 additions and 35 deletions

View File

@ -404,11 +404,6 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector
return _endp.isBlocking();
}
public boolean isBufferred()
{
return _endp.isBufferred();
}
public boolean blockReadable(long millisecs) throws IOException
{
return _endp.blockReadable(millisecs);

View File

@ -374,13 +374,7 @@ public class ByteArrayEndPoint implements ConnectedEndPoint
{
return false;
}
/* ------------------------------------------------------------ */
public boolean isBufferred()
{
return false;
}
/* ------------------------------------------------------------ */
/**
* @return the growOutput

View File

@ -122,13 +122,9 @@ public interface EndPoint
*/
public int getRemotePort();
/* ------------------------------------------------------------ */
public boolean isBlocking();
/* ------------------------------------------------------------ */
public boolean isBufferred();
/* ------------------------------------------------------------ */
public boolean blockReadable(long millisecs) throws IOException;

View File

@ -317,12 +317,6 @@ public class StreamEndPoint implements EndPoint
return false;
}
/* ------------------------------------------------------------ */
public boolean isBufferred()
{
return false;
}
/* ------------------------------------------------------------ */
public int getMaxIdleTime()
{

View File

@ -523,12 +523,6 @@ public class ChannelEndPoint implements EndPoint
return false;
}
/* ------------------------------------------------------------ */
public boolean isBufferred()
{
return false;
}
/* ------------------------------------------------------------ */
public int getMaxIdleTime()
{

View File

@ -630,8 +630,6 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
}
finally
{
dispatched=!undispatch();
if (!_ishut && isInputShutdown() && isOpen())
{
_ishut=true;
@ -654,6 +652,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
updateKey();
}
}
dispatched=!undispatch();
}
}
}

View File

@ -64,6 +64,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
private AsyncEndPoint _aEndp;
private boolean _allowRenegotiate=true;
private boolean _handshook;
private boolean _ishut;
private boolean _oshut;
/* ------------------------------------------------------------ */
@ -199,6 +200,25 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
finally
{
releaseBuffers();
if (!_ishut && _sslEndPoint.isInputShutdown() && _sslEndPoint.isOpen())
{
_ishut=true;
try
{
_connection.onInputShutdown();
}
catch (ThreadDeath e)
{
throw e;
}
catch(Throwable x)
{
LOG.warn("onInputShutdown failed", x);
try{_sslEndPoint.close();}
catch(IOException e2){LOG.ignore(e2);}
}
}
}
return this;
@ -769,11 +789,6 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
return false;
}
public boolean isBufferred()
{
return true;
}
public int getMaxIdleTime()
{
return _aEndp.getMaxIdleTime();