public abstract class ServiceServerConnection<T extends Session,S extends Service<T>> extends ServerConnection
Modifier and Type | Field and Description |
---|---|
protected S |
service |
protected T |
session |
statistics
Constructor and Description |
---|
ServiceServerConnection(org.apache.mina.core.session.IoSession session,
S service) |
Modifier and Type | Method and Description |
---|---|
protected CallbackHandler |
createCallbackHandler(Long callbackHandlerId) |
protected NotifyFuture<T> |
createSession(Properties properties,
Map<String,Object> contextInformation,
CallbackHandler callbackHandler) |
void |
dispose() |
protected void |
failSession(Exception e) |
protected void |
handleCreateSession(CreateSession message) |
protected void |
initializeSession(T session) |
protected SessionPrivilegesChanged |
makePrivilegeChangeMessage(Set<String> privileges) |
void |
messageReceived(Object message) |
protected void |
setSession(Future<T> sessionFuture) |
getSslSession, handleMessageReceived, requestClose, sendMessage
public ServiceServerConnection(org.apache.mina.core.session.IoSession session, S service)
public void messageReceived(Object message) throws Exception
messageReceived
in class ServerConnection
Exception
protected void handleCreateSession(CreateSession message)
protected void failSession(Exception e)
protected void initializeSession(T session)
protected SessionPrivilegesChanged makePrivilegeChangeMessage(Set<String> privileges)
protected NotifyFuture<T> createSession(Properties properties, Map<String,Object> contextInformation, CallbackHandler callbackHandler)
contextInformation
- additional context information, e.g. source host namecallbackHandler
- handler receiving callbackspublic void dispose()
dispose
in class ServerConnection
protected CallbackHandler createCallbackHandler(Long callbackHandlerId)