public class ConnectionImpl extends ClientBaseConnection implements Connection
callbackFactory, connectCallbackHandler
connectionInformation, executor, statistics
Constructor and Description |
---|
ConnectionImpl(ConnectionInformation connectionInformation) |
Modifier and Type | Method and Description |
---|---|
void |
browse(Location location,
BrowseOperationCallback callback)
Browse a server folder for items.
|
ScheduledExecutorService |
getExecutor()
Retrieve the executor that is currently set
|
protected void |
handleMessage(Object message)
Handle a message that came in by the current session.
|
protected void |
onConnectionClosed()
Called when the connection got closed
|
protected void |
onConnectionConnected()
Called when the connection got connected
|
FolderListener |
setFolderListener(Location location,
FolderListener listener)
Set the listener for this location.
|
ItemUpdateListener |
setItemUpdateListener(String itemId,
ItemUpdateListener listener)
Set the listener for this item.
|
NotifyFuture<WriteResult> |
startWrite(String itemId,
Variant value,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
NotifyFuture<WriteAttributeResults> |
startWriteAttributes(String itemId,
Map<String,Variant> attributes,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
void |
subscribeFolder(Location location) |
void |
subscribeItem(String itemId) |
void |
unsubscribeFolder(Location location) |
void |
unsubscribeItem(String itemId) |
void |
write(String itemId,
Variant value,
OperationParameters operationParameters,
WriteOperationCallback callback) |
void |
writeAttributes(String itemId,
Map<String,Variant> attributes,
OperationParameters operationParameters,
WriteAttributeOperationCallback callback) |
addConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, firePrivilegeChange, getPrivileges, getSession, getSslSession, getState, handleConnectComplete, isDisposed, messageReceived, onConnectionBound, performClosed, performDisconnected, performOpened, removeConnectionStateListener, removePrivilegeListener, sendMessage, sendMessageChecked, setCallbackFactory, setState, switchState
getConnectionInformation, getSessionProperties, getStatistics, setSessionProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, getConnectionInformation, getPrivileges, getSessionProperties, getState, removeConnectionStateListener, removePrivilegeListener, setCallbackFactory
public ConnectionImpl(ConnectionInformation connectionInformation) throws Exception
Exception
protected void onConnectionConnected()
ClientBaseConnection
This method is called while the connection lock is held.
The default implementation switches directly to
ConnectionState.BOUND
onConnectionConnected
in class ClientBaseConnection
protected void handleMessage(Object message)
ClientBaseConnection
Note that the method is called while holding the lock the connection itself.
handleMessage
in class ClientBaseConnection
message
- the received messageprotected void onConnectionClosed()
ClientBaseConnection
This method is called while the connection lock is held.
The default implementation does nothing.
onConnectionClosed
in class ClientBaseConnection
public void browse(Location location, BrowseOperationCallback callback)
Connection
location
- The path to browsecallback
- The callback that shall receive notifications of the operationpublic void write(String itemId, Variant value, OperationParameters operationParameters, WriteOperationCallback callback)
public void writeAttributes(String itemId, Map<String,Variant> attributes, OperationParameters operationParameters, WriteAttributeOperationCallback callback)
public NotifyFuture<WriteResult> startWrite(String itemId, Variant value, OperationParameters operationParameters, CallbackHandler callbackHandler)
public NotifyFuture<WriteAttributeResults> startWriteAttributes(String itemId, Map<String,Variant> attributes, OperationParameters operationParameters, CallbackHandler callbackHandler)
public void subscribeFolder(Location location) throws NoConnectionException, OperationException
public void unsubscribeFolder(Location location) throws NoConnectionException, OperationException
public FolderListener setFolderListener(Location location, FolderListener listener)
Connection
location
- The location for which to set the listenerlistener
- The listener to setnull
if there was no
previous listenerpublic void subscribeItem(String itemId) throws NoConnectionException, OperationException
public void unsubscribeItem(String itemId) throws NoConnectionException, OperationException
public ItemUpdateListener setItemUpdateListener(String itemId, ItemUpdateListener listener)
Connection
itemId
- The item for which to set the listenerlistener
- The listener to setnull
if there was no
previous listenerpublic ScheduledExecutorService getExecutor()
Connection
null
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.