public interface CommandManager
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 |
---|---|
java.lang.String |
getChannel()
PUBLIC:
Return the service channel for this command manager.
|
CommandConverter |
getCommandConverter()
PUBLIC:
Return the converter instance used to convert between TopLink Command
objects and an application command format.
|
CommandProcessor |
getCommandProcessor()
PUBLIC:
Return the command processor that processes commands received from the cluster.
|
DiscoveryManager |
getDiscoveryManager()
PUBLIC:
Return the discovery manager that manages membership in the EclipseLink cluster.
|
TransportManager |
getTransportManager()
PUBLIC:
Return the transport manager that manages sending and receiving of remote commands.
|
java.lang.String |
getUrl()
PUBLIC:
Return the URL for this command manager.
|
void |
initialize()
PUBLIC:
Initialize the remote command manager.
|
boolean |
isCommandProcessorASession()
ADVANCE:
Return whether this commandProcessor is a EclipseLink session or not.
|
void |
propagateCommand(java.lang.Object command)
ADVANCED:
Propagate a remote command to all remote RCM services participating
in the EclipseLink cluster.
|
void |
setChannel(java.lang.String channel)
ADVANCED:
Set the service channel for this command manager.
|
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.
|
void |
setCommandProcessor(CommandProcessor commandProcessor)
ADVANCED:
Set the command processor that will be invoked to process commands.
|
void |
setShouldPropagateAsynchronously(boolean asyncMode)
ADVANCED:
Set whether this command manager should propagate commands
synchronously or asynchronously.
|
void |
setTransportManager(TransportManager newTransportManager)
ADVANCED:
Set a specific transport manager to manage sending and receiving of remote commands.
|
void |
setUrl(java.lang.String url)
ADVANCED:
Set the URL for this command manager.
|
boolean |
shouldPropagateAsynchronously()
PUBLIC:
Return whether this command manager should propagate commands
synchronously or asynchronously.
|
void |
shutdown()
PUBLIC:
Shut down the remote command manager.
|
void initialize()
void shutdown()
java.lang.String getUrl()
void setUrl(java.lang.String url)
url
- The URL String for this CommandManagerjava.lang.String getChannel()
void setChannel(java.lang.String channel)
channel
- The service channel subscribed to by this CommandManagervoid propagateCommand(java.lang.Object command)
command
- An object representing a TopLink commandCommandProcessor getCommandProcessor()
void setCommandProcessor(CommandProcessor commandProcessor)
commandProcessor
- The intended processor of remote commandsvoid setTransportManager(TransportManager newTransportManager)
newTransportManager
- An instance of the desired transport manager typeTransportManager getTransportManager()
DiscoveryManager getDiscoveryManager()
CommandConverter getCommandConverter()
void setCommandConverter(CommandConverter commandConverter)
commandConverter
- The converter to be used by this CommandManagerboolean shouldPropagateAsynchronously()
void setShouldPropagateAsynchronously(boolean asyncMode)
boolean isCommandProcessorASession()