Purpose: Provide an interface that clients can use to invoke remote commands on other EclipseLink instances, or on other applications that may want to receive and process EclipseLink commands.
Description: This is the main interface that is used to send and receive remote commands in a EclipseLink cluster. The sequence of remote command execution is as follows:
Responsibilities:
Command, CommandProcessor
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The service channel String subscribed to by this CommandManagerPUBLIC: Return the service channel for this command manager. |
| public CommandConverter | Returns: The converter being used by this CommandManagerPUBLIC: Return the converter instance used to convert between TopLink Command objects and an application command format. |
| public CommandProcessor | Returns: An implementation instance of CommandProcessorPUBLIC: Return the command processor that processes commands received from the cluster. |
| public DiscoveryManager | Returns: The DiscoveryManager instance being used by this CommandManagerPUBLIC: Return the discovery manager that manages membership in the EclipseLink cluster. |
| public TransportManager | Returns: The TransportManager instance being used by this CommandManagerPUBLIC: Return the transport manager that manages sending and receiving of remote commands. |
| public String | Returns: The URL String for this CommandManagerPUBLIC: Return the URL for this command manager. |
| public void | |
| public boolean | isCommandProcessorASession()
ADVANCE: Return whether this commandProcessor is a EclipseLink session or not. |
| public void | propagateCommand(Object
An object representing a TopLink command command)ADVANCED: Propagate a remote command to all remote RCM services participating in the EclipseLink cluster. |
| public void | setChannel(String
The service channel subscribed to by this CommandManager channel)ADVANCED: Set the service channel for this command manager. |
| public void | setCommandConverter(CommandConverter
The converter to be used by this CommandManager commandConverter)ADVANCED: Set the converter instance that will be invoked by this CommandProcessor to convert commands from their application command format into EclipseLink Command objects before being propagated to remote command manager services. |
| public void | setCommandProcessor(CommandProcessor
The intended processor of remote commands commandProcessor)ADVANCED: Set the command processor that will be invoked to process commands. |
| public void | setShouldPropagateAsynchronously(boolean asyncMode)
ADVANCED: Set whether this command manager should propagate commands synchronously or asynchronously. |
| public void | setTransportManager(TransportManager
An instance of the desired transport manager type newTransportManager)ADVANCED: Set a specific transport manager to manage sending and receiving of remote commands. |
| public void | |
| public boolean | shouldPropagateAsynchronously()
PUBLIC: Return whether this command manager should propagate commands synchronously or asynchronously. |
| public void |
| getChannel | back to summary |
|---|---|
| public String getChannel() PUBLIC: Return the service channel for this command manager. All command managers with the same service channel will send and receive commands from each other. Commands sent on other service channels will not be exchanged with this command manager.
| |
| getCommandConverter | back to summary |
|---|---|
| public CommandConverter getCommandConverter() PUBLIC: Return the converter instance used to convert between TopLink Command objects and an application command format.
| |
| getCommandProcessor | back to summary |
|---|---|
| public CommandProcessor getCommandProcessor() PUBLIC: Return the command processor that processes commands received from the cluster.
| |
| getDiscoveryManager | back to summary |
|---|---|
| public DiscoveryManager getDiscoveryManager() PUBLIC: Return the discovery manager that manages membership in the EclipseLink cluster.
| |
| getTransportManager | back to summary |
|---|---|
| public TransportManager getTransportManager() PUBLIC: Return the transport manager that manages sending and receiving of remote commands.
| |
| getUrl | back to summary |
|---|---|
| public String getUrl() PUBLIC: Return the URL for this command manager.
| |
| initialize | back to summary |
|---|---|
| public void initialize() PUBLIC: Initialize the remote command manager. This will also trigger the DiscoveryManager to start establishing the EclipseLink cluster. | |
| isCommandProcessorASession | back to summary |
|---|---|
| public boolean isCommandProcessorASession() ADVANCE: Return whether this commandProcessor is a EclipseLink session or not. | |
| propagateCommand | back to summary |
|---|---|
| public void propagateCommand(Object command) ADVANCED: Propagate a remote command to all remote RCM services participating in the EclipseLink cluster.
| |
| setChannel | back to summary |
|---|---|
| public void setChannel(String channel) ADVANCED: Set the service channel for this command manager. All command managers with the same service channel will send and receive commands from each other. Commands sent on other service channels will not be exchanged with this command manager.
| |
| setCommandConverter | back to summary |
|---|---|
| public void setCommandConverter(CommandConverter commandConverter) ADVANCED: Set the converter instance that will be invoked by this CommandProcessor to convert commands from their application command format into EclipseLink Command objects before being propagated to remote command manager services. The converter will also be invoked to convert EclipseLink Command objects into application format before being sent to the CommandProcessor for execution.
| |
| setCommandProcessor | back to summary |
|---|---|
| public void setCommandProcessor(CommandProcessor commandProcessor) ADVANCED: Set the command processor that will be invoked to process commands. EclipseLink applications can implement this interface in order to receive remote commands from a EclipseLink cluster.
| |
| setShouldPropagateAsynchronously | back to summary |
|---|---|
| public void setShouldPropagateAsynchronously(boolean asyncMode) ADVANCED: Set whether this command manager should propagate commands synchronously or asynchronously. If set to synchronous propagation then propagateCommand() will not return to the caller until the command has been executed on all of the services in the cluster. In asynchronous mode the command manager will create a separate thread for each of the remote service executions, and then promptly return to the caller. | |
| setTransportManager | back to summary |
|---|---|
| public void setTransportManager(TransportManager newTransportManager) ADVANCED: Set a specific transport manager to manage sending and receiving of remote commands.
| |
| setUrl | back to summary |
|---|---|
| public void setUrl(String url) ADVANCED: Set the URL for this command manager.
| |
| shouldPropagateAsynchronously | back to summary |
|---|---|
| public boolean shouldPropagateAsynchronously() PUBLIC: Return whether this command manager should propagate commands synchronously or asynchronously. If set to synchronous propagation then propagateCommand() will not return to the caller until the command has been executed on all of the services in the cluster. In asynchronous mode the command manager will create a separate thread for each of the remote service executions, and then promptly return to the caller. | |
| shutdown | back to summary |
|---|---|
| public void shutdown() PUBLIC: Shut down the remote command manager. This will also trigger the DiscoveryManager to stop. Note Although this call initiates the shutdown process, no guarantees are made as to when it will actually complete. | |