public abstract class AbstractConnectionDevice extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractConnectionDevice.ConnectionState |
Modifier and Type | Field and Description |
---|---|
protected BundleContext |
context |
protected ScheduledExecutorService |
executor |
protected String |
id |
protected DataItemFactory |
itemFactory |
Constructor and Description |
---|
AbstractConnectionDevice(BundleContext context,
String id,
org.apache.mina.transport.socket.nio.NioProcessor processor,
ScheduledExecutorService executor,
String itemPrefix) |
AbstractConnectionDevice(BundleContext context,
String id,
org.apache.mina.transport.socket.nio.NioProcessor processor,
String threadPrefix,
String itemPrefix) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkSession(org.apache.mina.core.session.IoSession session) |
protected void |
configure(Map<String,String> properties) |
protected abstract void |
configureConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector) |
protected void |
disconnect() |
void |
dispose() |
protected ScheduledExecutorService |
getExecutor() |
String |
getItemId(String localId) |
protected static int |
getTimeout(Map<String,String> properties,
String specificTimeoutKey,
int defaultValue) |
String |
getVarItemId(String localId) |
protected void |
handleExceptionCaught(org.apache.mina.core.session.IoSession session,
Throwable error) |
protected void |
handleMessageReceived(org.apache.mina.core.session.IoSession session,
Object message) |
protected void |
handleMessageSent(org.apache.mina.core.session.IoSession session,
Object message) |
protected void |
handleSessionClosed(org.apache.mina.core.session.IoSession session) |
protected void |
handleSessionCreated(org.apache.mina.core.session.IoSession session) |
protected void |
handleSessionDisconnected() |
protected void |
handleSessionIdle(org.apache.mina.core.session.IoSession session,
org.apache.mina.core.session.IdleStatus status) |
protected void |
handleSessionOpened(org.apache.mina.core.session.IoSession session) |
protected void |
performDispose() |
protected void |
setSession(org.apache.mina.core.session.IoSession session) |
protected final ScheduledExecutorService executor
protected final BundleContext context
protected final String id
protected final DataItemFactory itemFactory
public AbstractConnectionDevice(BundleContext context, String id, org.apache.mina.transport.socket.nio.NioProcessor processor, ScheduledExecutorService executor, String itemPrefix)
public AbstractConnectionDevice(BundleContext context, String id, org.apache.mina.transport.socket.nio.NioProcessor processor, String threadPrefix, String itemPrefix)
protected ScheduledExecutorService getExecutor()
public void dispose()
protected void performDispose()
protected void configure(Map<String,String> properties) throws Exception
Exception
protected static int getTimeout(Map<String,String> properties, String specificTimeoutKey, int defaultValue)
protected abstract void configureConnector(org.apache.mina.transport.socket.nio.NioSocketConnector connector)
protected void setSession(org.apache.mina.core.session.IoSession session)
protected void handleSessionDisconnected()
protected void disconnect()
protected void handleExceptionCaught(org.apache.mina.core.session.IoSession session, Throwable error) throws Exception
Exception
protected void handleMessageReceived(org.apache.mina.core.session.IoSession session, Object message) throws Exception
Exception
protected void handleMessageSent(org.apache.mina.core.session.IoSession session, Object message) throws Exception
Exception
protected void checkSession(org.apache.mina.core.session.IoSession session)
protected void handleSessionClosed(org.apache.mina.core.session.IoSession session) throws Exception
Exception
protected void handleSessionCreated(org.apache.mina.core.session.IoSession session) throws Exception
Exception
protected void handleSessionIdle(org.apache.mina.core.session.IoSession session, org.apache.mina.core.session.IdleStatus status) throws Exception
Exception