Skip navigation links


com.essbase.eas.framework.defs.command
Class CommandRequest

java.lang.Object
  extended by com.essbase.eas.framework.defs.command.CommandRequest


public class CommandRequest
extends java.lang.Object

Provides information about a command request. We use this to simplify the calls to command manager sendCommand() methods.

Since:
7.0.0
Version:
7.1.0
Author:
Hank Cox

Constructor Summary
protected CommandRequest()
           
  CommandRequest(java.lang.String command, java.util.Hashtable primary, java.util.Hashtable secondary, byte[] data, java.lang.Class resultClass, java.lang.Class binaryMessageClass, boolean secureMode, CommandResultListener listener)
          Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener.
  CommandRequest(java.lang.String command, java.util.Hashtable primary, java.util.Hashtable secondary, byte[] data, java.lang.Class resultClass, java.lang.Class binaryMessageClass, CommandResultListener listener)
          Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener.
  CommandRequest(java.lang.String command, java.util.Hashtable primary, java.util.Hashtable secondary, byte[] data, java.lang.Class resultClass, CommandResultListener listener)
          Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener.

 

Method Summary
 void clear()
          Releases field references and internal structures.
 java.lang.Class getBinaryMessageClass()
          Gets the binary message type.
 java.lang.String getCommand()
          Gets the string containing the command value.
 byte[] getData()
          Gets any binary data to send as part of the command request.
 java.io.InputStream getInputStream()
           
 int getLength()
           
 int getOffset()
           
 java.util.Hashtable getPrimaryParameters()
          Gets the set of primary command parameters.
 java.lang.Class getResultClass()
          Gets the class object representing the type of the expected results.
 CommandResultListener getResultListener()
          Gets the result listener that the results of this command should be routed to.
 java.util.Hashtable getSecondaryParameters()
          Gets the set of secondary command parameters.
 boolean isInputStreamRequested()
           
 boolean isSecure()
          Gets information about whether this command should be sent in a "secure" manner.
 void setBinaryMessageClass(java.lang.Class value)
          Sets the binary message type.
 void setCommand(java.lang.String value)
          sets the string containing the command value.
 void setData(byte[] value)
          Sets any binary data to send as part of the command request.
 void setData(byte[] data, int offset, int len)
          Sets the data for the request
 void setInputStream(java.io.InputStream inp)
           
 void setInputStreamRequested(boolean value)
           
 void setPrimaryParameters(java.util.Hashtable value)
          sets the primary command parameters.
 void setResultClass(java.lang.Class value)
          Sets the class object representing the type of the expected results.
 void setResultListener(CommandResultListener value)
          Sets the result listener that will handle the results of this command request.
 void setSecondaryParameters(java.util.Hashtable value)
          sets the secondary command parameters.
 void setSecure(boolean value)
          Sets the value indicating whether this command should be sent in a "secure" manner.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

CommandRequest

protected CommandRequest()

CommandRequest

public CommandRequest(java.lang.String command,
                      java.util.Hashtable primary,
                      java.util.Hashtable secondary,
                      byte[] data,
                      java.lang.Class resultClass,
                      CommandResultListener listener)
Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener.
Parameters:
command - the command to send to the EAS server.
primary - the primary set of parameters.
secondary - the secondary set of parameters.
data - - optional binary data to send.
resultClass - - the class object representing the expected result object.
listener - - a optional result listener for the command request.

CommandRequest

public CommandRequest(java.lang.String command,
                      java.util.Hashtable primary,
                      java.util.Hashtable secondary,
                      byte[] data,
                      java.lang.Class resultClass,
                      java.lang.Class binaryMessageClass,
                      CommandResultListener listener)
Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener.
Parameters:
command - the command to send to the EAS server.
primary - the primary set of parameters.
secondary - the secondary set of parameters.
data - - optional binary data to send.
resultClass - - the class object representing the expected result object.
binaryMessageClass - - the class object representing any expected binary results.
listener - - a optional result listener for the command request.

CommandRequest

public CommandRequest(java.lang.String command,
                      java.util.Hashtable primary,
                      java.util.Hashtable secondary,
                      byte[] data,
                      java.lang.Class resultClass,
                      java.lang.Class binaryMessageClass,
                      boolean secureMode,
                      CommandResultListener listener)
Constructs a command request using the requested command string, primary parameters, secondary parameters, result class, and result listener. This constructor can be used to indicate that the command should be sent over a secure connection using https instead of http
Parameters:
command - the command to send to the EAS server.
primary - the primary set of parameters.
secondary - the secondary set of parameters.
data - - optional binary data to send.
resultClass - - the class object representing the expected result object.
binaryMessageClass - - the class object representing any expected binary results.
secureMode - - true to use https; false otherwise.
listener - - a optional result listener for the command request.

Method Detail

getCommand

public java.lang.String getCommand()
Gets the string containing the command value. This is the text that will be sent to the EAS server as the command.
Returns:
the command

setCommand

public void setCommand(java.lang.String value)
sets the string containing the command value.
Parameters:
value - the new command value.

getPrimaryParameters

public java.util.Hashtable getPrimaryParameters()
Gets the set of primary command parameters. The primary parameters are contained in a hash table. The key set of the hast table contains the parameter names and the value set contains the parameter values. The object returned from this call should not be modified.
Returns:
returns the hastable containing the primary parameters for the command

setPrimaryParameters

public void setPrimaryParameters(java.util.Hashtable value)
sets the primary command parameters. The keys of the hashtable are the parameter names and the values in the hashtable are the parameter values.
Parameters:
value - the hashtable containing the primary parameter keys and values.

getSecondaryParameters

public java.util.Hashtable getSecondaryParameters()
Gets the set of secondary command parameters. The secondary parameters are contained in a hash table. The key set of the hast table contains the parameter names and the value set contains the parameter values. The object returned from this call should not be modified.
Returns:
returns the hastable containing the secondary parameters for the command

setSecondaryParameters

public void setSecondaryParameters(java.util.Hashtable value)
sets the secondary command parameters. The keys of the hashtable are the parameter names and the values in the hashtable are the parameter values.
Parameters:
value - the hashtable containing the secondary parameter keys and values.

getResultClass

public java.lang.Class getResultClass()
Gets the class object representing the type of the expected results. A command manager can use this to test the validity of the results from the framework server.
Returns:
the class object for the expected results

setResultClass

public void setResultClass(java.lang.Class value)
Sets the class object representing the type of the expected results. A command manager can use the result class to test the validity of the results from the framework server.
Parameters:
value - the class type of the expected command results.

getData

public byte[] getData()
Gets any binary data to send as part of the command request.
Returns:
an array of bytes to send as binary data to the EAS server.

setData

public void setData(byte[] value)
Sets any binary data to send as part of the command request.
Parameters:
value - the data to send to the EAS server.

getResultListener

public CommandResultListener getResultListener()
Gets the result listener that the results of this command should be routed to.
Returns:
a CommandResultListener that will handle the results of this command.

setResultListener

public void setResultListener(CommandResultListener value)
Sets the result listener that will handle the results of this command request. A result listener can be used with threaded (background) commands so that the calling code doesn't have to wait for this command to complete.
Parameters:
value - sets the result listener for this command.

setBinaryMessageClass

public void setBinaryMessageClass(java.lang.Class value)
Sets the binary message type. If this is set, the framework will extract any binary results returned from the EAS server; otherwise any binary results must be extracted by the code that requested the command be sent.
Parameters:
value - the type of any expected binary message results.

getBinaryMessageClass

public java.lang.Class getBinaryMessageClass()
Gets the binary message type. The framework calls this method and, if a non-null result is returned will extract any expected binary results returned from the EAS server.
Returns:
a Class object representing the type of any expected binary message results.

isSecure

public boolean isSecure()
Gets information about whether this command should be sent in a "secure" manner. In general, this could mean many things; however, in the current implementations, a secure command will be sent using the https protocol.
Returns:
true if this is a request for a secure command; otherwise, false

setSecure

public void setSecure(boolean value)
Sets the value indicating whether this command should be sent in a "secure" manner. In general, this could mean many things; however, in the current implementations, a secure command will be sent using the https protocol.
Parameters:
value - true if the request is a secure command; false if the request is not secure.

clear

public void clear()
Releases field references and internal structures. This is an attempt to help the JRE garbage collection and reference counting. Calls to this method are reserved for the framework and should not be made by any other code.

setData

public void setData(byte[] data,
                    int offset,
                    int len)
Sets the data for the request
Parameters:
data - byte buffer
offset - starting offset of the data
len - length of the data.

getOffset

public int getOffset()

getLength

public int getLength()

setInputStreamRequested

public void setInputStreamRequested(boolean value)

isInputStreamRequested

public boolean isInputStreamRequested()

setInputStream

public void setInputStream(java.io.InputStream inp)

getInputStream

public java.io.InputStream getInputStream()

Skip navigation links


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