public abstract class NetworkBase extends DestroyableBase implements Network
The base implementation of Network
Destroyable.Util
Modifier and Type | Field and Description |
---|---|
protected static org.osgl.logging.Logger |
logger |
Constructor and Description |
---|
NetworkBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
bootUp() |
protected abstract void |
close() |
WebSocketConnectionHandler |
createWebSocketConnectionHandler()
Create a
WebSocketConnectionHandler instance without message handler, i.e. |
WebSocketConnectionHandler |
createWebSocketConnectionHandler(ActionMethodMetaInfo methodInfo)
create a
WebSocketConnectionHandler instance |
protected abstract WebSocketConnectionHandler |
internalCreateWsConnHandler(ActionMethodMetaInfo methodInfo,
WebSocketConnectionManager manager) |
void |
register(int port,
boolean secure,
NetworkHandler client) |
protected void |
releaseResources() |
protected void |
resetWebSocketConnectionHandler() |
protected abstract void |
setUpClient(NetworkHandler client,
int port,
boolean secure) |
void |
shutdown() |
void |
start() |
addSubResource, destroy, isDestroyed, reload, scope
debug, debug, error, error, fatal, fatal, info, info, isDebugEnabled, isTraceEnabled, trace, trace, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, isDestroyed, scope
public void register(int port, boolean secure, NetworkHandler client)
protected void resetWebSocketConnectionHandler()
protected abstract void setUpClient(NetworkHandler client, int port, boolean secure) throws java.io.IOException
java.io.IOException
protected abstract void bootUp()
protected abstract void close()
protected void releaseResources()
releaseResources
in class DestroyableBase
public WebSocketConnectionHandler createWebSocketConnectionHandler(ActionMethodMetaInfo methodInfo)
Network
create a WebSocketConnectionHandler
instance
createWebSocketConnectionHandler
in interface Network
methodInfo
- the action handler method meta infopublic WebSocketConnectionHandler createWebSocketConnectionHandler()
Network
Create a WebSocketConnectionHandler
instance without message handler, i.e. the handler is pure created to handle connection request. This is typically used when client request connection for push notification from server
createWebSocketConnectionHandler
in interface Network
protected abstract WebSocketConnectionHandler internalCreateWsConnHandler(ActionMethodMetaInfo methodInfo, WebSocketConnectionManager manager)
Copyright © 2014–2017 ActFramework. All rights reserved.