public abstract class AbstractProtocolConnection extends java.lang.Object implements ProtocolConnection
ServerRequests are created by Server.createRequest()
Constructor and Description |
---|
AbstractProtocolConnection() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProtocolRequestURL()
Returns a default debugging identifier for the connection
|
abstract boolean |
handleRequest()
Handles a new connection.
|
boolean |
handleResume()
Handles a resumption of the connection for an async/comet request.
|
void |
init()
Initialize the connection.
|
void |
onAttachThread()
Called when the connection is attached to a thread
|
void |
onCloseConnection()
Handles a close event when the connection is closed.
|
void |
onDetachThread()
Called when the connection is detached from a thread
|
void |
onStartConnection()
Called when the connection starts, i.e.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWaitForRead
public void init()
init
in interface ProtocolConnection
public void onAttachThread()
onAttachThread
in interface ProtocolConnection
public void onDetachThread()
onDetachThread
in interface ProtocolConnection
public void onStartConnection()
ProtocolConnection
onStartConnection
in interface ProtocolConnection
public void onCloseConnection()
onCloseConnection
in interface ProtocolConnection
public java.lang.String getProtocolRequestURL()
getProtocolRequestURL
in interface ProtocolConnection
public abstract boolean handleRequest() throws java.io.IOException
handleRequest
in interface ProtocolConnection
conn
- Information about the connection, including buffered
read and write streams.java.io.IOException
public boolean handleResume() throws java.io.IOException
handleResume
in interface ProtocolConnection
java.io.IOException