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 |
connectCallbackHandlerconnectionInformation, executor, statistics| Constructor and Description |
|---|
ConnectionImpl(ConnectionInformation connectionInformation) |
| Modifier and Type | Method and Description |
|---|---|
|
browse(Location location) |
void |
browse(Location location,
BrowseOperationCallback callback)
Browse a server folder for items.
|
protected java.util.Collection<Entry> |
convert(java.util.List<BrowserEntry> addedOrModified) |
static WriteAttributeResults |
convertResults(java.util.List<AttributeWriteResultEntry> attributeResults) |
java.util.concurrent.ScheduledExecutorService |
getExecutor()
Retrieve the executor that is currently set
|
protected void |
handleMessage(java.lang.Object message)
Handle a message that came in by the current session.
|
protected static java.util.Map<java.lang.String,Variant> |
makeAttributes(java.util.Map<java.lang.String,Variant> addedOrUpdated,
java.util.Set<java.lang.String> removed) |
protected static OperationParameters |
makeParameters(OperationParameters operationParameters) |
FolderListener |
setFolderListener(Location location,
FolderListener listener)
Set the listener for this location.
|
ItemUpdateListener |
setItemUpdateListener(java.lang.String itemId,
ItemUpdateListener listener)
Set the listener for this item.
|
|
startWrite(java.lang.String itemId,
Variant value,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
|
startWriteAttributes(java.lang.String itemId,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters,
CallbackHandler callbackHandler) |
void |
subscribeFolder(Location location) |
void |
subscribeItem(java.lang.String itemId) |
void |
unsubscribeFolder(Location location) |
void |
unsubscribeItem(java.lang.String itemId) |
void |
write(java.lang.String itemId,
Variant value,
OperationParameters operationParameters,
WriteOperationCallback callback) |
void |
writeAttributes(java.lang.String itemId,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters,
WriteAttributeOperationCallback callback) |
makeProperties, nextRequest, onConnectionClosed, onConnectionConnected, processCallbackFuture, registerCallbackHandler, sendRequestMessage, setCallbackFactoryaddConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, firePrivilegeChange, getPrivileges, getSession, getSslSession, getState, handleConnectComplete, isDisposed, messageReceived, onConnectionBound, performClosed, performDisconnected, performOpened, removeConnectionStateListener, removePrivilegeListener, sendMessage, sendMessageChecked, setState, switchStategetConnectionInformation, getSessionProperties, getStatistics, setSessionPropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionStateListener, addPrivilegeListener, connect, connect, disconnect, dispose, getConnectionInformation, getPrivileges, getSessionProperties, getState, removeConnectionStateListener, removePrivilegeListener, setCallbackFactorypublic ConnectionImpl(ConnectionInformation connectionInformation)
throws java.lang.Exception
java.lang.Exceptionpublic static WriteAttributeResults convertResults(java.util.List<AttributeWriteResultEntry> attributeResults)
public void browse(Location location, BrowseOperationCallback callback)
Connectionlocation - The path to browsecallback - The callback that shall receive notifications of the operationpublicbrowse(Location location)
public void write(java.lang.String itemId,
Variant value,
OperationParameters operationParameters,
WriteOperationCallback callback)
publicstartWrite(java.lang.String itemId, Variant value, OperationParameters operationParameters, CallbackHandler callbackHandler)
public void writeAttributes(java.lang.String itemId,
java.util.Map<java.lang.String,Variant> attributes,
OperationParameters operationParameters,
WriteAttributeOperationCallback callback)
publicstartWriteAttributes(java.lang.String itemId, java.util.Map<java.lang.String,Variant> attributes, OperationParameters operationParameters, CallbackHandler callbackHandler)
public void subscribeFolder(Location location) throws NoConnectionException, OperationException
NoConnectionExceptionOperationExceptionpublic void unsubscribeFolder(Location location) throws NoConnectionException, OperationException
NoConnectionExceptionOperationExceptionpublic FolderListener setFolderListener(Location location, FolderListener listener)
Connectionlocation - The location for which to set the listenerlistener - The listener to setnull if there was no
previous listenerpublic void subscribeItem(java.lang.String itemId)
throws NoConnectionException,
OperationException
NoConnectionExceptionOperationExceptionpublic void unsubscribeItem(java.lang.String itemId)
throws NoConnectionException,
OperationException
NoConnectionExceptionOperationExceptionpublic ItemUpdateListener setItemUpdateListener(java.lang.String itemId, ItemUpdateListener listener)
ConnectionitemId - The item for which to set the listenerlistener - The listener to setnull if there was no
previous listenerprotected void handleMessage(java.lang.Object message)
ClientBaseConnectionNote that the method is called while holding the lock the connection itself.
handleMessage in class ConnectionBaseImplmessage - the received messagepublic java.util.concurrent.ScheduledExecutorService getExecutor()
Connectionnullprotected static java.util.Map<java.lang.String,Variant> makeAttributes(java.util.Map<java.lang.String,Variant> addedOrUpdated,
java.util.Set<java.lang.String> removed)
protected java.util.Collection<Entry> convert(java.util.List<BrowserEntry> addedOrModified)
protected static OperationParameters makeParameters(OperationParameters operationParameters)
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0