public class ConnectionImpl extends SessionConnectionBase implements Connection
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,HistoricalItemInformation> |
knownItems |
protected Random |
random |
static String |
VERSION |
executor, SESSION_CLIENT_VERSIONmessenger, session, statistics| Constructor and Description |
|---|
ConnectionImpl(ConnectionInformation connectionInformantion) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListListener(ItemListListener listener)
Add a new listener to the connection in order to receive item list
updates.
|
void |
closeQuery(QueryImpl queryImpl)
Close a registered query
|
Query |
createQuery(String itemId,
QueryParameters parameters,
QueryListener listener,
boolean updateData)
Create a new query on the server
|
Executor |
getExecutor() |
String |
getRequiredVersion() |
protected void |
handleListUpdate(Message message) |
protected void |
handleQueryDataUpdate(Message message) |
protected void |
handleQueryParameterUpdate(Message message) |
protected void |
handleQueryStatusUpdate(Message message) |
protected void |
init() |
void |
removeListListener(ItemListListener listener)
Remove a listener from the connection
|
protected void |
sendCreateQuery(long id,
String itemId,
QueryParameters parameters,
boolean updateData) |
protected void |
switchState(ConnectionState state,
Throwable error,
Map<String,String> properties) |
void |
updateQueryParameters(QueryImpl queryImpl,
QueryParameters parameters) |
addPrivilegeListener, dispose, getPrivileges, handlePrivChange, modifyFilterChain, onConnectionClosed, onConnectionEstablished, processSessionReply, removePrivilegeListener, requestSessionaddConnectionStateListener, cancelConnection, connect, connect, connectFailed, disconnect, disconnect, exceptionCaught, finalize, getConnectionInformation, getConnectTimeout, getIntProperty, getMessageTimeout, getPingPeriod, getSessionProperties, getSocketReceiveBufferSize, getSocketSendBufferSize, getState, getStatistics, isConnected, messageReceived, messageSent, onConnectionBound, performConnect, performLookup, removeConnectionStateListener, resolvedRemoteAddress, sessionClosed, sessionCreated, sessionIdle, sessionOpened, setBound, setCallbackFactory, setupConnectorclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, getConnectionInformation, getPrivileges, getSessionProperties, getState, removeConnectionStateListener, removePrivilegeListener, setCallbackFactoryprotected final Random random
public static final String VERSION
protected Map<String,HistoricalItemInformation> knownItems
public ConnectionImpl(ConnectionInformation connectionInformantion)
public String getRequiredVersion()
getRequiredVersion in class SessionConnectionBaseprotected void init()
protected void handleQueryParameterUpdate(Message message)
protected void handleQueryStatusUpdate(Message message)
protected void handleQueryDataUpdate(Message message)
protected void handleListUpdate(Message message)
public Executor getExecutor()
protected void switchState(ConnectionState state, Throwable error, Map<String,String> properties)
switchState in class ConnectionBasepublic void addListListener(ItemListListener listener)
ConnectionA new listener will also receive any already known items.
listener - the listener to addpublic void removeListListener(ItemListListener listener)
Connectionlistener - the listener to removepublic Query createQuery(String itemId, QueryParameters parameters, QueryListener listener, boolean updateData)
ConnectionitemId - the historical item to queryparameters - the initial query parameterslistener - the listener that will receive dataupdateData - true if the query should provide continuous
updates, false if the query should only be
executed once an not data
updates should be delivered after the query state changed to
QueryState.COMPLETE.null is never returnedprotected void sendCreateQuery(long id,
String itemId,
QueryParameters parameters,
boolean updateData)
public void updateQueryParameters(QueryImpl queryImpl, QueryParameters parameters)
public void closeQuery(QueryImpl queryImpl)
queryImpl - the registered query to close