public interface RemoteCUAdmin extends ControlUnitAdmin
ControlUnitAdmin service aiming to provide the ability for control units
to be remotely managed in the same manner as if they were managed on their local OSGi framework.
same interface for
control unit management on the remote end-point of the Control Unit Management Protocol. RemoteCUAdmin
extends the ControlUnitAdmin interface and applies additional methods regarding the needs for remote
management of control units. These are methods for:
disposing a user tracked gateway connection to the RemoteCUAdmin service
to perform remote requests through the underlying Control Unit Management Protocol.
registering / unregistering control unit and state variable listeners.
defining a cache of control units to be maintained by the RemoteCUAdmin service in order to
achieve an efficient remote management.
retrieving control units' metadata provided on the OSGi framework. This metadata can not be retrieved from the
usual ControlUnitAdmin service.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this
RemoteCUAdmin object and releases
all system resources associated with it. |
void |
defineCache(int cacheSize,
java.lang.String cuTypesFilter,
java.util.Dictionary svListenerProperties)
With this method applications can define a cache of control units to be maintained by the service.
|
MetaTypeProvider |
getMetadata(java.lang.String cuType)
Retrieves control unit metadata provided on the target framework for given control unit type.
|
void |
registerControlUnitListener(ControlUnitListener l,
java.util.Dictionary cuListenerProps)
Registers a control unit listener.
|
void |
registerHierarchyListener(HierarchyListener l,
java.util.Dictionary svListenerProps)
Registers a hierarchy listener.
|
void |
registerStateVariableListener(StateVariableListener l,
java.util.Dictionary svListenerProps)
Registers a state variable listener.
|
void |
unregisterControlUnitListener(ControlUnitListener l)
Unregisters a control unit listener.
|
void |
unregisterHierarchyListener(HierarchyListener l)
Unregisters a hierarchy listener.
|
void |
unregisterStateVariableListener(StateVariableListener l)
Unregisters a state variable listener.
|
createControlUnit, destroyControlUnit, findControlUnits, getControlUnit, getControlUnitTypes, getControlUnitTypeVersion, getParentControlUnits, getParentControlUnitTypes, getSubControlUnits, getSubControlUnitTypes, invokeAction, queryStateVariablevoid defineCache(int cacheSize,
java.lang.String cuTypesFilter,
java.util.Dictionary svListenerProperties)
throws java.lang.Exception
ControlUnitAdmin service API is quite inefficient for
remote usage. Applications can define cache size, type of control units and set of state variables to be cached.
The cache holds control unit states and is kept up-to-date using a private state variable listener, created
regarding a user specified svListenerProperties parameter. State variables that do not match the
SVEventSubscription object's state variable filter are not cached, and thus, they are always
retrieved from the remote gateway when requested. Cache is organized with a Least Recently Used algorithm.cacheSize - size of cache. Defines the maximum amount of control unit states to be cached.cuTypesFilter - filter in ldap form on control units types (ControlConstants.TYPE)
defining the types of control units to be cached.svListenerProperties - definition of private StateVariableListener for keeping the cache up-to-date.java.lang.Exception - thrown if the subscription for state variable events fails.void close()
RemoteCUAdmin object and releases
all system resources associated with it.void registerControlUnitListener(ControlUnitListener l, java.util.Dictionary cuListenerProps) throws java.lang.Exception
l - application defined ControlUnitListener object. If this ControlUnitListener
instance is already registered, the old registration is replaced with the new one.cuListenerProps - a Dictionary object that may hold properties for the listener registration
on the target framework and properties defined in RemoteControlConstants interface specifying the
event delivering behavior.java.lang.Exception - thrown if a system error occurs.void unregisterControlUnitListener(ControlUnitListener l) throws java.lang.Exception
l - application defined ControlUnitListener objectjava.lang.Exception - thrown if a system error occurs.void registerStateVariableListener(StateVariableListener l, java.util.Dictionary svListenerProps) throws java.lang.Exception
l - application defined StateVariableListener object. If this StateVariableListener
instance is already registered, the old registration is replaced with the new one.svListenerProps - a Dictionary object that may hold properties for the listener registration
on the target framework and properties defined in RemoteControlConstants interface specifying the
event delivering behavior.java.lang.Exception - thrown if a system error occurs.void unregisterStateVariableListener(StateVariableListener l) throws java.lang.Exception
l - application defined StateVariableListener objectjava.lang.Exception - thrown if a system error occurs.void registerHierarchyListener(HierarchyListener l, java.util.Dictionary svListenerProps) throws java.lang.Exception
l - application defined HierarchyListener object. If this HierarchyListener
isntance is already registered, the old registration is replaced with the new one.svListenerProps - a Dictionary object that may hold properties for the listener registration
on the target framework and properties defined in RemoteControlConstants interface specifying the
event delivering behavior.java.lang.Exception - thrown if a system error occurs.void unregisterHierarchyListener(HierarchyListener l) throws java.lang.Exception
l - application defined HierarchyListener objectjava.lang.Exception - thrown if a system error occurs.MetaTypeProvider getMetadata(java.lang.String cuType) throws java.lang.Exception
cuType - control units type.MetaTypeProvider object providing the control unit's metadata. null if metadata
for this control unit type is not provided on the target framrwrok.java.lang.Exception - thrown if a system error occurs.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.