public abstract class SessionConnector extends Object implements Connector
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_QUEUE_CAPACITY |
protected org.slf4j.Logger |
log |
protected PropertyChangeSupport |
propertyChangeSupport |
static String |
QF_SESSION |
static String |
SESSIONS_PROPERTY |
Constructor and Description |
---|
SessionConnector(SessionSettings settings,
SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addDynamicSession(Session inSession) |
void |
addPropertyChangeListener(PropertyChangeListener listener) |
protected Session |
createSession(SessionID sessionID) |
protected int |
getIntSetting(String key) |
protected org.apache.mina.core.filterchain.IoFilterChainBuilder |
getIoFilterChainBuilder() |
List<Session> |
getManagedSessions()
Get the list of session managed by this connector.
|
protected ScheduledExecutorService |
getScheduledExecutorService() |
protected Map<SessionID,Session> |
getSessionMap()
This is for subclasses to directly access the session map.
|
ArrayList<SessionID> |
getSessions()
Return the list of session identifiers of sessions managed
by this connector.
|
SessionSettings |
getSettings() |
boolean |
isLoggedOn()
Check if we have at least one session and that all the sessions are logged on
|
protected void |
logError(SessionID sessionID,
org.apache.mina.core.session.IoSession protocolSession,
String message,
Throwable t) |
protected void |
logoutAllSessions(boolean forceDisconnect) |
void |
removeDynamicSession(SessionID inSessionID) |
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
setIoFilterChainBuilder(org.apache.mina.core.filterchain.IoFilterChainBuilder ioFilterChainBuilder)
Allows a custom IOFilterChainBuilder to be added to the session connector.
|
protected void |
setSessions(Map<SessionID,Session> sessions) |
protected void |
startSessionTimer() |
protected void |
stopSessionTimer() |
protected void |
waitForLogout() |
protected static final int DEFAULT_QUEUE_CAPACITY
public static final String SESSIONS_PROPERTY
public static final String QF_SESSION
protected final org.slf4j.Logger log
protected final PropertyChangeSupport propertyChangeSupport
public SessionConnector(SessionSettings settings, SessionFactory sessionFactory) throws ConfigError
ConfigError
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public List<Session> getManagedSessions()
Session
protected Map<SessionID,Session> getSessionMap()
public ArrayList<SessionID> getSessions()
getSessions
in interface Connector
public void addDynamicSession(Session inSession)
public void removeDynamicSession(SessionID inSessionID)
public SessionSettings getSettings()
protected Session createSession(SessionID sessionID) throws ConfigError
ConfigError
protected int getIntSetting(String key) throws ConfigError
ConfigError
public boolean isLoggedOn()
isLoggedOn
in interface Connector
protected void logoutAllSessions(boolean forceDisconnect)
protected void waitForLogout()
protected void logError(SessionID sessionID, org.apache.mina.core.session.IoSession protocolSession, String message, Throwable t)
protected void startSessionTimer()
protected void stopSessionTimer()
protected ScheduledExecutorService getScheduledExecutorService()
public void setIoFilterChainBuilder(org.apache.mina.core.filterchain.IoFilterChainBuilder ioFilterChainBuilder)
ioFilterChainBuilder
- IoFilterChainBuilder
protected org.apache.mina.core.filterchain.IoFilterChainBuilder getIoFilterChainBuilder()
Copyright © 2016. All rights reserved.