public class ConnectionImpl extends ConnectionBaseImpl implements Connection
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionImpl.BrowseFuture |
static class |
ConnectionImpl.WriteAttributesFuture |
static class |
ConnectionImpl.WriteFuture |
connectCallbackHandler
connectionInformation, executor, statistics
Constructor and Description |
---|
ConnectionImpl(ConnectionInformation connectionInformation) |
ConnectionImpl(ConnectionInformation connectionInformation,
org.apache.mina.core.service.IoProcessor<org.apache.mina.transport.socket.nio.NioSession> processor)
Create a new connection
|
makeProperties, nextRequest, onConnectionClosed, onConnectionConnected, processCallbackFuture, registerCallbackHandler, sendRequestMessage, setCallbackFactory
addConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, firePrivilegeChange, getPrivileges, getSession, getSslSession, getState, handleConnectComplete, isDisposed, messageReceived, onConnectionBound, performClosed, performDisconnected, performOpened, removeConnectionStateListener, removePrivilegeListener, sendMessage, sendMessageChecked, 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
public ConnectionImpl(ConnectionInformation connectionInformation, org.apache.mina.core.service.IoProcessor<org.apache.mina.transport.socket.nio.NioSession> processor) throws Exception
connectionInformation
- the information where to connect toprocessor
- the socket processor, may be null
to use the
defaultException
- if anything goes wrongpublic static WriteAttributeResults convertResults(List<AttributeWriteResultEntry> attributeResults)
public void browse(Location location, BrowseOperationCallback callback)
Connection
location
- The path to browsecallback
- The callback that shall receive notifications of the operationpublic NotifyFuture<Entry[]> browse(Location location)
public void write(String itemId, Variant value, OperationParameters operationParameters, WriteOperationCallback callback)
public NotifyFuture<WriteResult> startWrite(String itemId, Variant value, OperationParameters operationParameters, CallbackHandler callbackHandler)
public void writeAttributes(String itemId, Map<String,Variant> attributes, OperationParameters operationParameters, WriteAttributeOperationCallback callback)
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 listenerprotected void handleMessage(Object message)
ClientBaseConnection
Note that the method is called while holding the lock the connection itself.
handleMessage
in class ConnectionBaseImpl
message
- the received messagepublic ScheduledExecutorService getExecutor()
Connection
null
protected static Map<String,Variant> makeAttributes(Map<String,Variant> addedOrUpdated, Set<String> removed)
protected Collection<Entry> convert(List<BrowserEntry> addedOrModified)
protected static OperationParameters makeParameters(OperationParameters operationParameters)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.