public class SPDYAsyncConnection extends AbstractConnection implements AsyncConnection, Controller<StandardSession.FrameBytes>, IdleListener
_endp
Constructor and Description |
---|
SPDYAsyncConnection(AsyncEndPoint endPoint,
ByteBufferPool bufferPool,
Parser parser) |
Modifier and Type | Method and Description |
---|---|
void |
close(boolean onlyOutput) |
int |
fill() |
int |
flush() |
AsyncEndPoint |
getEndPoint() |
protected Session |
getSession() |
Connection |
handle()
Handle the connection.
|
boolean |
isIdle() |
boolean |
isSuspended()
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called
isReadInterested() . |
void |
onClose()
Called after the connection is closed
|
void |
onIdle(boolean idle) |
void |
onIdleExpired(long idleForMs)
Called when the connection idle timeout expires
|
void |
onInputShutdown() |
protected void |
setSession(Session session) |
String |
toString() |
int |
write(ByteBuffer buffer,
Handler<StandardSession.FrameBytes> handler,
StandardSession.FrameBytes context) |
getTimeStamp
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTimeStamp
public SPDYAsyncConnection(AsyncEndPoint endPoint, ByteBufferPool bufferPool, Parser parser)
public Connection handle() throws IOException
Connection
handle
in interface Connection
IOException
- if the handling of I/O operations failpublic int fill() throws IOException
IOException
public int flush()
public int write(ByteBuffer buffer, Handler<StandardSession.FrameBytes> handler, StandardSession.FrameBytes context)
write
in interface Controller<StandardSession.FrameBytes>
public void close(boolean onlyOutput)
close
in interface Controller<StandardSession.FrameBytes>
public void onIdle(boolean idle)
onIdle
in interface IdleListener
public AsyncEndPoint getEndPoint()
getEndPoint
in class AbstractConnection
public boolean isIdle()
isIdle
in interface Connection
Connection.onIdleExpired(long)
public boolean isSuspended()
Connection
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called isReadInterested()
.
isSuspended
in interface Connection
public void onClose()
Connection
onClose
in interface Connection
public void onInputShutdown() throws IOException
onInputShutdown
in interface AsyncConnection
IOException
public void onIdleExpired(long idleForMs)
Connection
onIdleExpired
in interface Connection
onIdleExpired
in class AbstractConnection
idleForMs
- how long the connection has been idleConnection.isIdle()
protected Session getSession()
protected void setSession(Session session)
public String toString()
toString
in class AbstractConnection
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.