public class ConnectionBaseImpl extends ClientBaseConnection
connectCallbackHandler
connectionInformation, executor, statistics
Constructor and Description |
---|
ConnectionBaseImpl(ProtocolConfigurationFactory protocolConfigurationFactory,
ConnectionInformation connectionInformation,
org.apache.mina.core.service.IoProcessor<org.apache.mina.transport.socket.nio.NioSession> processor) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleMessage(Object message)
Handle a message that came in by the current session.
|
protected Map<String,String> |
makeProperties() |
protected Request |
nextRequest() |
protected void |
onConnectionClosed()
Called when the connection got closed
|
protected void |
onConnectionConnected()
Called when the connection got connected
|
protected void |
processCallbackFuture(Request request,
Future<Callback[]> future,
Callback[] callbacks) |
protected Long |
registerCallbackHandler(Request request,
CallbackHandler callbackHandler) |
protected NotifyFuture<ResponseMessage> |
sendRequestMessage(RequestMessage requestMessage) |
void |
setCallbackFactory(CallbackFactory callbackFactory) |
addConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, firePrivilegeChange, getPrivileges, getSession, getSslSession, getState, handleConnectComplete, isDisposed, messageReceived, onConnectionBound, performClosed, performDisconnected, performOpened, removeConnectionStateListener, removePrivilegeListener, sendMessage, sendMessageChecked, setState, switchState
getConnectionInformation, getSessionProperties, getStatistics, setSessionProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnectionInformation, getSessionProperties
public ConnectionBaseImpl(ProtocolConfigurationFactory protocolConfigurationFactory, ConnectionInformation connectionInformation, org.apache.mina.core.service.IoProcessor<org.apache.mina.transport.socket.nio.NioSession> processor) throws Exception
Exception
public void setCallbackFactory(CallbackFactory callbackFactory)
setCallbackFactory
in interface Connection
setCallbackFactory
in class ClientBaseConnection
protected void onConnectionConnected()
ClientBaseConnection
This method is called while the connection lock is held.
The default implementation switches directly to
ConnectionState.BOUND
onConnectionConnected
in class ClientBaseConnection
protected void onConnectionClosed()
ClientBaseConnection
This method is called while the connection lock is held.
The default implementation does nothing.
onConnectionClosed
in class ClientBaseConnection
protected void handleMessage(Object message)
ClientBaseConnection
Note that the method is called while holding the lock the connection itself.
handleMessage
in class ClientBaseConnection
message
- the received messageprotected void processCallbackFuture(Request request, Future<Callback[]> future, Callback[] callbacks)
protected Long registerCallbackHandler(Request request, CallbackHandler callbackHandler)
protected Request nextRequest()
protected NotifyFuture<ResponseMessage> sendRequestMessage(RequestMessage requestMessage)