public interface ControlUnitProxy
ControlUnitProxy
could be obtained through ControlUnitProxyFactory.createControlUnitProxy method. A ControlUnitProxy
service is designed to work with a single connection at a moment. If the Remote Administration is meant to manage a
large number of OSGi frameworks, it should create a separate ControlUnitProxy instance for each
connection it holds. It is responsibility to the user application to track a connection and to provide it to the
ControlUnitProxy to perform its remote request. Applications can do this by invoking the setConnection method.
ControlUnitProxy works on the following principle:
On every request-method invoked, it generates a respective Message instance.
Request messages are not sent at once, but stay buffered and are being sent when the user application invokes the
send or sendSync method.
ControlUnitProxy is responsible to capture the response messages and to deliver them to the
user implemented RemoteControlUnitAdminApplication instance with which the ControlUnitProxy
object is created.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this
ControlUnitProxy object and releases
all system resources associated with it. |
void |
createControlUnit(java.lang.String requestId,
java.lang.String cuType,
java.lang.String constructorId,
java.lang.Object constructorArgs)
Generates a create control unit request message.
|
void |
destroyControlUnit(java.lang.String requestId,
java.lang.String cuType,
java.lang.String cuId)
Generates a destroy control unit request message.
|
void |
findControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String finderId,
java.lang.Object finderArgs,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
Generates a find control units request message.
|
void |
getControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String[] cuIds,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
Generates a request control units message.
|
void |
getControlUnitTypes(java.lang.String requestId)
Generates a control unit types request message.
|
void |
getIcon(java.lang.String requestId,
java.lang.String cuType,
java.lang.String ocdId,
int size)
Generates an icon request message.
|
void |
getMetaType(java.lang.String requestId,
java.lang.String cuType)
Generates a metatype request message.
|
void |
getMetaType(java.lang.String requestId,
java.lang.String cuType,
boolean aggregateSuperMetatypes)
Generates a metatype request message.
|
int |
getRemoteAgentState()
Checks whether the remote side agent is running or not.
|
void |
getSubControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String parentType,
java.lang.String parentId,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
Generates a request sub control units message.
|
void |
invokeAction(java.lang.String requestId,
java.lang.String cuType,
java.lang.String cuId,
java.lang.String actionId,
java.lang.Object actionArgs)
Generates an invoke action request message.
|
void |
resetMessages()
Clears any buffered messages.
|
void |
send()
Sends buffered messages asynchronously.
|
void |
sendSync()
Sends buffered messages synchronously.
|
void |
subscribe(java.lang.String requestId,
java.lang.String subscriptionId,
CUEventSubscription cuSubscription,
SVEventSubscription svSubscription,
HEventSubscription hSubscription,
java.util.Dictionary stateInterfaces)
Generates a subscribe message.
|
void close()
ControlUnitProxy object and releases
all system resources associated with it.void getControlUnitTypes(java.lang.String requestId)
RemoteControlUnitAdminApplication.processControlUnitTypes methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.void findControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String finderId,
java.lang.Object finderArgs,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
RemoteControlUnitAdminApplication.processReceiveControlUnits methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.finderId - finderArgs - cuMode - denotes the level of control units' information to be retrieved.
This could be one of the constants ID, CHECKSUM or STATE
denied in ControlUnitInfo interface.svNamesList - Dicitonary of key-value pairs: String cuType->String[] svNamesList, defining the
interfaces of control units state to be received. If the cuMode parameter denotes
CHECKSUM or STATE, this state interface will be used for constructing the control
units' checksums or states respectively. If a value of null is specified, then the system
shall use state interfaces for this control unit type defined in previously made subscription in the scope
of this connection. If more than one subscriptions have been made defining state interface for this control unit type,
the latest subscription shall be used. If there are no subscriptions defining the control unit interface,
the system shall to try to produce it from the control unit metatype provided in the target framework.void getSubControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String parentType,
java.lang.String parentId,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
RemoteControlUnitAdminApplication.processReceiveControlUnits methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.parentType - the type of the parent Control Unit.parentId - the id of the parent Control Unit.cuMode - denotes the level of control units' information to be retrieved.
This could be one of the constants ID, CHECKSUM or STATE
denied in ControlUnitInfo interface.svNamesList - Dicitonary of key-value pairs: String cuType->String[] svNamesList, defining the
interfaces of control units state to be received. If the cuMode parameter denotes
CHECKSUM or STATE, this state interface will be used for constructing the control
units' checksums or states respectively. If a value of null is specified, then the system
shall use state interfaces for this control unit type defined in previously made subscription in the scope
of this connection. If more than one subscriptions have been made defining state interface for this control unit type,
the latest subscription shall be used. If there are no subscriptions defining the control unit interface,
the system shall to try to produce it from the control unit metatype provided in the target framework.void getControlUnits(java.lang.String requestId,
java.lang.String cuType,
java.lang.String[] cuIds,
int cuMode,
java.lang.String[] svNamesList,
boolean parentInfo)
RemoteControlUnitAdminApplication.processReceiveControlUnits methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.cuIds - - value of null means all control units of the specified type.cuMode - denotes the level of control units' information to be retrieved.
This could be one of the constants ID, CHECKSUM or STATE
denied in ControlUnitInfo interface.svNamesList - Dicitonary of key-value pairs: String cuType->String[] svNamesList, defining the
interfaces of control units state to be received. If the cuMode parameter denotes
CHECKSUM or STATE, this state interface will be used for constructing the control
units' checksums or states respectively. If a value of null is specified, then the system
shall use state interfaces for this control unit type defined in previously made subscription in the scope
of this connection. If more than one subscriptions have been made defining state interface for this control unit type,
the latest subscription shall be used. If there are no subscriptions defining the control unit interface,
the system shall to try to produce it from the control unit metatype provided in the target framework.void invokeAction(java.lang.String requestId,
java.lang.String cuType,
java.lang.String cuId,
java.lang.String actionId,
java.lang.Object actionArgs)
RemoteControlUnitAdminApplication.processInvokeActionResult methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.actionId - actionArgs - void createControlUnit(java.lang.String requestId,
java.lang.String cuType,
java.lang.String constructorId,
java.lang.Object constructorArgs)
RemoteControlUnitAdminApplication.processCreateControlUnitReply methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.constructorId - the id of the constructor.constructorArgs - - the 'constructors' argument(s).void destroyControlUnit(java.lang.String requestId,
java.lang.String cuType,
java.lang.String cuId)
RemoteControlUnitAdminApplication.processDestroyControlUnitReply methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.cuId - id of a control unit.void getMetaType(java.lang.String requestId,
java.lang.String cuType)
RemoteControlUnitAdminApplication.processControlUnitMetaType methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.
file with which the control unit metatype is provided.void getMetaType(java.lang.String requestId,
java.lang.String cuType,
boolean aggregateSuperMetatypes)
RemoteControlUnitAdminApplication.processControlUnitMetaType methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.aggregateSuperMetatypes - if true, the requested metatype will be united with all super metatypes.
file with which the control unit metatype is provided.void subscribe(java.lang.String requestId,
java.lang.String subscriptionId,
CUEventSubscription cuSubscription,
SVEventSubscription svSubscription,
HEventSubscription hSubscription,
java.util.Dictionary stateInterfaces)
RemoteControlUnitAdminApplication.processEventSubscriptionReply methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.subscriptionId - id of the subscription. Each subscription replaces a previously made one
in the scope of a given connection.cuSubscription - a CUEventSubscription object containing control unit listener's
properties that define event filtering and event delivering behavior. Specifying a value of null
means that no control unit events should be receivedsvSubscription - a SVEventSubscription object containing state variable listener's
properties that define event filtering and event delivering behavior. Specifying a value of null
means that no control state variable events should be receivedstateInterfaces - Dicitonary of key-value pairs: String cuType->String[] svNamesList, defining the
interfaces of control units state to be received.void getIcon(java.lang.String requestId,
java.lang.String cuType,
java.lang.String ocdId,
int size)
RemoteControlUnitAdminApplication.processGetIcon methodrequestId - user specified request id. The same id will be passed to the request callback of the
user provided RemoteControlUnitAdminApplication service.cuType - control unit type.ocdId - id of the object class definition.size - icon size.void resetMessages()
void send() throws java.io.IOException
java.io.IOException - if system error occures.void sendSync()
throws java.io.IOException
RemoteControlUnitAdminApplication with the respective
responses shall be invoked before this method exits.java.io.IOException - if system error occures.int getRemoteAgentState()
org.mbs.services.cup.ral.RemoteAgentListener#AGENT_STARTED or
@link org.mbs.services.cup.ral.RemoteAgentListener#AGENT_STOPPEDCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.