Skip navigation links


com.essbase.eas.framework.defs.command
Interface CommandManager

All Known Implementing Classes:
DefaultCommandManager, UICommandManager

public interface CommandManager

Defines the methods that must be supported by an implementing command manager.

Since:
7.0.0
Version:
7.1.0
Author:
Hank Cox

Method Summary
 CommandRequestor getRequestor()
          returns the command requestor associated with the command manager.
 java.lang.String[] getReservedCommands()
          returns a set of commands that should be routed to this command manager.
 boolean performLogin()
          causes the command manager to trigger the actions that will connect to a server.
 boolean performLogin(boolean reuseSession)
          cause the command manager to connect to a server but use an existing session instead of initiating a new one
 CommandResult routeCommand(java.lang.Object component, CommandRequest request)
          routes a command to the correct place.
 boolean routeResultsToListeners(CommandRequest request, CommandResult results, int counter)
          attempts to route command results to the registered listeners for the command.
 void routeThreadedCommand(CommandRequest request)
          routes a threaded command to the correct place.
 CommandResult sendCommand(java.lang.Object component, CommandRequest request)
          sends a command to the correct location.
 BinaryMessage sendCommandGetBinary(java.lang.String command, java.util.Properties params, java.lang.Class resultClass, byte[] data, boolean background, boolean secure)
          sends the requested command to the appropriate EAS mid-tier server.
 java.io.InputStream sendCommandGetInputStream(java.lang.String command, java.util.Properties params, java.lang.Class resultClass, boolean background)
           
 CommandResult sendCommandGetResult(java.lang.String command, java.util.Properties params, byte[] data, boolean background, boolean secure)
           
 CommandResult sendCommandGetResult(java.lang.String command, java.util.Properties params, java.lang.Class resultClass, byte[] data, boolean background, boolean secure)
           
 java.lang.String sendCommandGetString(java.lang.String command, java.util.Properties params, byte[] data, boolean background, boolean secure)
          sends the requested command to the appropriate EAS mid-tier server.
 java.lang.String sendCommandGetString(java.lang.String command, java.util.Properties params, byte[] data, int offset, int len, boolean background, boolean secure)
          sends the requested command to the appropriate EAS mid-tier server.
 void sendThreadedCommand(CommandRequest request)
          sends a command to the correct location.
 void setRequestor(CommandRequestor value)
          sets the command requestor associated with the command manager.

 

Method Detail

performLogin

boolean performLogin()
                     throws FrameworkException
causes the command manager to trigger the actions that will connect to a server.
Returns:
true if the login action was successful; false otherwise.
Throws:
FrameworkException - if any exception is thrown by underlying code.

performLogin

boolean performLogin(boolean reuseSession)
                     throws FrameworkException
cause the command manager to connect to a server but use an existing session instead of initiating a new one
Parameters:
reuseSession - login using an existing command requestor if possible
Returns:
true if succeeds to login
Throws:
FrameworkException

getRequestor

CommandRequestor getRequestor()
returns the command requestor associated with the command manager.
Returns:
the command requestor object associated with this command manager.

setRequestor

void setRequestor(CommandRequestor value)
sets the command requestor associated with the command manager.
Parameters:
value - the command requestor.

routeResultsToListeners

boolean routeResultsToListeners(CommandRequest request,
                                CommandResult results,
                                int counter)
attempts to route command results to the registered listeners for the command.
Parameters:
request - the command request
results - the command results
counter - counter
Returns:
returns true if succeeded to route false otherwise

getReservedCommands

java.lang.String[] getReservedCommands()
returns a set of commands that should be routed to this command manager. In order to speed performance, implementers of command managers can set reserve certain "commands" to be routed directly to themselves.
Returns:
an array of Strings that can be used as keys in a hashtable. This return value cannot be null, and must be an array of length 0 if the command manager doesn't want to reserve commands.

sendCommand

CommandResult sendCommand(java.lang.Object component,
                          CommandRequest request)
                          throws CommandRequestException,
                                 java.io.IOException
sends a command to the correct location. This method is intended to be called from classes outside the inheritance hierarchy.
Parameters:
component - a supplemental component that the instantiater of this interface will know what to do with; for instance, a UICommandManager would expect this object to be a Swing Component and would set the wait cursor.
request - the command being requested
Returns:
the CommandResult
Throws:
CommandRequestException - if the request isn't properly formatted.
java.io.IOException

sendThreadedCommand

void sendThreadedCommand(CommandRequest request)
                         throws CommandRequestException,
                                java.io.IOException
sends a command to the correct location. This method is intended to be called from classes outside the inheritance hierarchy.
Parameters:
request - the command being requested
Throws:
CommandRequestException - if the request isn't properly formatted.
java.io.IOException

routeCommand

CommandResult routeCommand(java.lang.Object component,
                           CommandRequest request)
                           throws CommandRequestException,
                                  java.io.IOException
routes a command to the correct place. This method should not be called by classes outside the inheritance hierarchy of the CommandManager interface.
Parameters:
component - a supplemental component that the implementing class can act upon; for instance, if the implementing class is on a UI-based platform, then this component could be a Swing-based component for which setting the wait cursor would be appropriate.
request - the command being requested
Returns:
the results of the command.
Throws:
CommandRequestException - if the request isn't properly formatted.
java.io.IOException

routeThreadedCommand

void routeThreadedCommand(CommandRequest request)
                          throws CommandRequestException,
                                 java.io.IOException
routes a threaded command to the correct place. This method should not be called by classes outside the inheritance hierarchy of the CommandManager interface.
Parameters:
request - the command being requested
Throws:
CommandRequestException - if the request isn't properly formatted.
java.io.IOException

sendCommandGetString

java.lang.String sendCommandGetString(java.lang.String command,
                                      java.util.Properties params,
                                      byte[] data,
                                      boolean background,
                                      boolean secure)
                                      throws java.io.IOException
sends the requested command to the appropriate EAS mid-tier server. This method is provided for backwards compatibility with the original command manager methodology. It will eventually be deprecated. Warning: Using this method causes the XML to be parsed twice. It is intended that this method be overridden by platform specific command managers.
Parameters:
command - the command to send
params - the parameters for the command
data - binary data to be sent to the mid-tier as part of the command
background - whether to use background processing for this command
secure - whether to send this command in a secure mode.
Returns:
a String object representing the results.
Throws:
java.io.IOException

sendCommandGetString

java.lang.String sendCommandGetString(java.lang.String command,
                                      java.util.Properties params,
                                      byte[] data,
                                      int offset,
                                      int len,
                                      boolean background,
                                      boolean secure)
                                      throws java.io.IOException
sends the requested command to the appropriate EAS mid-tier server. This method is provided for backwards compatibility with the original command manager methodology. It will eventually be deprecated. Warning: Using this method causes the XML to be parsed twice. It is intended that this method be overridden by platform specific command managers.
Parameters:
command - the command to send
params - the parameters for the command
data - binary data to be sent to the mid-tier as part of the command
offset - offset of the data
len - length of data
background - whether to use background processing for this command
secure - whether to send this command in a secure mode.
Returns:
a String object representing the results.
Throws:
java.io.IOException

sendCommandGetResult

CommandResult sendCommandGetResult(java.lang.String command,
                                   java.util.Properties params,
                                   byte[] data,
                                   boolean background,
                                   boolean secure)
                                   throws java.io.IOException
Throws:
java.io.IOException

sendCommandGetResult

CommandResult sendCommandGetResult(java.lang.String command,
                                   java.util.Properties params,
                                   java.lang.Class resultClass,
                                   byte[] data,
                                   boolean background,
                                   boolean secure)
                                   throws java.io.IOException
Throws:
java.io.IOException

sendCommandGetBinary

BinaryMessage sendCommandGetBinary(java.lang.String command,
                                   java.util.Properties params,
                                   java.lang.Class resultClass,
                                   byte[] data,
                                   boolean background,
                                   boolean secure)
                                   throws java.io.IOException
sends the requested command to the appropriate EAS mid-tier server. This method is provided for backwards compatibility with the original command manager methodology. It will eventually be deprecated. Warning: Using this method causes the XML to be parsed twice. It is intended that this method be overridden by platform specific command managers.
Parameters:
command - the command to send
params - the parameters for the command
resultClass - the class of the expected BinaryMessage object. this can be used to receive results for object types that the CommandManager doesn't know about.
data - byte array to be sent as part of this command.
background - whether to use background processing for this command
secure - whether to send this command in a secure mode.
Returns:
a BinaryMessage object that can be cast the resultClass.
Throws:
java.io.IOException

sendCommandGetInputStream

java.io.InputStream sendCommandGetInputStream(java.lang.String command,
                                              java.util.Properties params,
                                              java.lang.Class resultClass,
                                              boolean background)
                                              throws java.io.IOException
Throws:
java.io.IOException

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.