public class SPDYConnection extends AbstractConnection implements Controller, IdleListener
Connection.Listener
EXECUTE_ONFILLABLE
Constructor and Description |
---|
SPDYConnection(EndPoint endPoint,
ByteBufferPool bufferPool,
Parser parser,
Executor executor) |
SPDYConnection(EndPoint endPoint,
ByteBufferPool bufferPool,
Parser parser,
Executor executor,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Performs a logical close of this connection.
|
void |
close(boolean onlyOutput) |
protected ISession |
getSession() |
protected void |
goAway(ISession session) |
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
void |
onIdle(boolean idle) |
void |
onOpen()
Callback method invoked when this
Connection is opened. |
protected boolean |
onReadTimeout()
Callback method invoked when the endpoint failed to be ready to be read after a timeout
|
protected int |
read(ByteBuffer buffer) |
void |
setSession(ISession session) |
void |
write(ByteBuffer buffer,
Callback callback) |
addListener, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, onClose, onFillInterestedFailed, setInputBufferSize, toString
public SPDYConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Executor executor)
public SPDYConnection(EndPoint endPoint, ByteBufferPool bufferPool, Parser parser, Executor executor, int bufferSize)
public void onOpen()
Connection
Callback method invoked when this Connection
is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen
in interface Connection
onOpen
in class AbstractConnection
public void onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
protected int read(ByteBuffer buffer)
public void write(ByteBuffer buffer, Callback callback)
write
in interface Controller
public void close()
Connection
Performs a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint
but, for example, SSL connections should write the SSL close message
before closing the associated EndPoint
.
close
in interface AutoCloseable
close
in interface Connection
close
in class AbstractConnection
public void close(boolean onlyOutput)
close
in interface Controller
public void onIdle(boolean idle)
onIdle
in interface IdleListener
protected boolean onReadTimeout()
AbstractConnection
Callback method invoked when the endpoint failed to be ready to be read after a timeout
onReadTimeout
in class AbstractConnection
protected void goAway(ISession session)
protected ISession getSession()
public void setSession(ISession session)
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.