public class ConnectionImpl extends SessionConnectionBase implements Connection
Modifier and Type | Field and Description |
---|---|
static String |
VERSION |
executor, SESSION_CLIENT_VERSION
messenger, session, statistics
Constructor and Description |
---|
ConnectionImpl(ConnectionInformation connectionInformantion) |
Modifier and Type | Method and Description |
---|---|
NotifyFuture<Void> |
acknowledge(String monitorId,
Date aknTimestamp,
OperationParameters operationParameters,
CallbackHandler callbackHandler)
Acknowledge the monitor if the akn state was reached at or before the
provided timestamp
|
void |
addBrowserListener(BrowserListener listener)
Add browser listener
|
void |
closeQuery(long queryId) |
Query |
createQuery(String queryType,
String queryData,
QueryListener listener) |
protected void |
fireBrowserListener(List<BrowserEntry> added,
Set<String> removed,
boolean full) |
Executor |
getExecutor() |
String |
getRequiredVersion() |
protected void |
handleBrowserUpdate(Message message) |
protected void |
handleConditionData(Message message) |
protected void |
handleConditionStatus(Message message) |
protected void |
handleEventData(Message message) |
protected void |
handleEventStatus(Message message) |
protected void |
handleQueryData(Message message) |
protected void |
handleQueryStateChange(Message message) |
protected void |
init() |
void |
loadMore(long queryId,
int count) |
protected void |
onConnectionBound() |
void |
removeBrowserListener(BrowserListener listener) |
void |
sessionClosed(org.apache.mina.core.session.IoSession session) |
void |
setEventListener(String eventQueryId,
EventListener listener)
Set the listener that should receive event updates
|
void |
setMonitorListener(String conditionQueryId,
MonitorListener listener)
Set the listener that should receive monitor updates
|
addPrivilegeListener, dispose, getPrivileges, handlePrivChange, modifyFilterChain, onConnectionClosed, onConnectionEstablished, processSessionReply, removePrivilegeListener, requestSession
addConnectionStateListener, cancelConnection, connect, connect, connectFailed, disconnect, disconnect, exceptionCaught, finalize, getConnectionInformation, getConnectTimeout, getIntProperty, getMessageTimeout, getPingPeriod, getSessionProperties, getSocketReceiveBufferSize, getSocketSendBufferSize, getState, getStatistics, isConnected, messageReceived, messageSent, performConnect, performLookup, removeConnectionStateListener, resolvedRemoteAddress, sessionCreated, sessionIdle, sessionOpened, setBound, setCallbackFactory, setupConnector, switchState
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, getConnectionInformation, getPrivileges, getSessionProperties, getState, removeConnectionStateListener, removePrivilegeListener, setCallbackFactory
public static final String VERSION
public ConnectionImpl(ConnectionInformation connectionInformantion)
public String getRequiredVersion()
getRequiredVersion
in class SessionConnectionBase
protected void init()
protected void handleQueryData(Message message)
protected void handleQueryStateChange(Message message)
protected void handleBrowserUpdate(Message message)
protected void handleEventData(Message message)
protected void handleConditionData(Message message)
protected void handleEventStatus(Message message)
protected void handleConditionStatus(Message message)
public Executor getExecutor()
public Query createQuery(String queryType, String queryData, QueryListener listener)
public void setMonitorListener(String conditionQueryId, MonitorListener listener)
Connection
public void setEventListener(String eventQueryId, EventListener listener)
Connection
protected void onConnectionBound()
onConnectionBound
in class ConnectionBase
public void sessionClosed(org.apache.mina.core.session.IoSession session) throws Exception
sessionClosed
in interface org.apache.mina.core.service.IoHandler
sessionClosed
in class ConnectionBase
Exception
public void addBrowserListener(BrowserListener listener)
Connection
listener
- the listener to addpublic void removeBrowserListener(BrowserListener listener)
protected void fireBrowserListener(List<BrowserEntry> added, Set<String> removed, boolean full)
public NotifyFuture<Void> acknowledge(String monitorId, Date aknTimestamp, OperationParameters operationParameters, CallbackHandler callbackHandler)
Connection
monitorId
- the id of the conditionaknTimestamp
- the timestamp up to which the state may be acknowledgedoperationParameters
- optionally provide some user information which performs the
aknowledgement. If the information is not provided the current
logged in user will be used. If the information is present but
the current logged in user is not allowed to change the user
performing acknowledgement the server may fall back to use the
actual information of the logged in user instead.public void closeQuery(long queryId)
public void loadMore(long queryId, int count)