com.tivoli.twg.libs
Class Command

java.lang.Object
  extended bycom.tivoli.twg.libs.Command
Direct Known Subclasses:
AckPopupEventCmd, ActDeactUserAccountCmd, AddRemoveKeyCmd, AddRemoveMOIDsFromStaticGroupCmd, AddRemoveTaskToObjectsCmd, CancelPopupEventCmd, CreateNonNativeAccountCmd, CreatePopupEventCmd, DeleteNonNativeAccountCmd, DeleteTWGUserCmd, com.tivoli.twg.procman.ExecuteCommand, FindFilterByIDCommand, FindObjectByAttribCmd, GetAddressEntryRecordCommand, GetAllAllowedMOIDCommand, GetUserAccountInfoCmd, InitTWGUserCmd, ManagedObjectLifeCycleCommand, ManagedObjectStateChangeCommand, MSCSAgentCommand, QueryProdLimitPropsCmd, RemoteSdkCommand, RemoteSdkGetApiDocumentation, RemoteSdkGetApiListCommand, RequestAllUserShadowsCommand, ResolveFilterMembersCommand, SendAuthorizationCommand, SendEventCommand, ServiceNodeInternalCommand, TWGConfigPropertiesCommand, TWGDistConfigQueryHashcodesCmd, TWGDistConfigQueryHashcodesForObjCmd, TWGDistConfigQueryRecordsCmd, TWGDistConfigQueryRecordsForObjCmd, TWGDistConfigSetRecordsCmd, TWGEventCommand, TWGFilterDeleteCommand, TWGFilterSubscribeCommand, TWGFilterUnsubscribeCommand, TWGGetAllAttributesCommand, TWGGetAttributeCommand, TWGManagedObjectAccessRequestCmd, TWGManagedObjectClassEnumCommand, TWGManagedObjectDeleteCommand, TWGManagedObjectEnumCommand, TWGManagedObjectRestartCommand, TWGObjectEnumCommand, TWGPersistentObjectEnumCommand, TWGPingCommand, TWGPublishCommand, TWGSecureUnsecureObjectsCmd, TWGServerCommand, TWGSetAttributeCommand, com.tivoli.twg.netipc.TWGSetSvcNodePublicCmd, TWGStartFullDiscoverCommand, TWGUnpublishCommand, TWGUpdateRequestCommand, TWGUserPropertiesCommand, UpdateNonNativeAccountPasswordCmd

public class Command
extends java.lang.Object

Command is a base class for defining Director transport messages.


Field Summary
static long CMD_SENDER_FLAG
           
static long CMDRET_CREATE_CMDPKT_FAILED
           
static long CMDRET_ENCRYPT_FAIL
           
static long CMDRET_ENQUEUE_LOCAL_FAILED
           
static long CMDRET_INVALID_DEST_ADDRESS
           
static long CMDRET_NO_LOCAL_SVCNODE_IMPL
           
static long CMDRET_SECURE_FAIL
           
static long CMDRET_SEND_BUFFER_FAILED
           
static long CMDRET_SEND_FAILED
          Standard return codes for communications errors
static long CMDRET_SEND_TIMEOUT
           
static long CMDRET_SERVICEFAILED
           
static long CMDRET_SESS_DISABLED_LCL
           
static long CMDRET_SESS_DISABLED_RMT
           
static long CMDRET_SESS_UNAVAIL_LCL
           
static long CMDRET_SESS_UNAVAIL_RMT
           
static long CMDRET_SESS_WAIT_DONE
           
static long CMDRET_SESS_WAIT_EXPIRED
           
static long CMDRET_SESS_WAITING
           
static byte COMMAND_TYPE_INPUT
           
static byte COMMAND_TYPE_OUTPUT
           
static int DEFAULT_CMD_TIMEOUT
          Default command timeout (15 seconds)
static byte ENQUEUE_FAILED_COPYDATA
           
static byte ENQUEUE_FAILED_NO_DESTPATH
           
static byte ENQUEUE_FAILED_NO_PROCESS_HANDLE
           
static byte ENQUEUE_FAILED_NO_SVC_NODE_HANDLE
           
static byte ENQUEUE_FAILED_SECURITY
           
static byte ENQUEUE_GENERAL_FAILURE
           
static byte JNI_BUFFER_NULL
           
static byte JNI_ENTRY_POINT_NOT_LOADED
           
static byte JNI_HANDLE_NULL
           
static byte JNI_INITIALIZE_FAILED
           
static byte RMI_LOOKUP_ERROR
           
static byte SESSION_NONE
           
static byte SESSION_PREFERRED
           
static byte SESSION_REQUIRED
           
 
Constructor Summary
Command(Command cmd)
          Constructor for Command, copied from another command
Command(long cmd)
          Constructor for Command.
Command(long cmd, CommandCompleteListener ccl)
          Constructor for Command.
 
Method Summary
 void AddInputParm(byte[] data)
          Add a copy of a provided buffer as an input parameter.
 void AddInputParm(byte[] data, int start, int length)
          Add a copy of a provided buffer as an input parameter.
 void AddObjectAsInputParm(java.lang.Object obj)
          Add a serialized object (compressed) as an input parameter
 void AddObjectAsOutputParm(java.lang.Object obj)
          Add a serialized object (compressed) as an output parameter
 void AddOutputParm(byte[] data)
          Add a copy of a provided buffer as an output parameter.
 void AddOutputParm(byte[] data, int start, int length)
          Add a copy of a provided buffer as an output parameter.
 void addToDebugStrings(Vect msglist, java.lang.Thread cur_thrd)
          Generate a contribution to the list of debug strings to be used for presenting the current status of the object in the given thread.
static byte[] AllocateBuffer(int len)
          Allocate buffer (byte array)
 void AttachInputParm(byte[] data)
          Attach a byte buffer as an input parameter
 void AttachOutputParm(byte[] data)
          Attach a byte buffer as an output parameter
 long CmdId()
          Return command ID
 long CommandCode()
          Retrieve command code
 java.lang.String commandCodeDebugString()
          Retrieve command code debug string
 void CommandComplete()
          Callback method invoked when command is completed.
static byte[] CompressObject(java.lang.Object obj)
          Serialize and compress and object, if possible, using the shared deflater
static void debugPrint(Command cmd)
           
static java.lang.Object DecompressObject(byte[] buf)
          Decompress and extract object, if possible, using the shared inflater
 java.lang.String DestinationAddress()
          Return destination address string.
 byte[] DetachInputParm(int index)
          Detach input parameter with given index.
 byte[] DetachOutputParm(int index)
          Detach output parameter with given index.
static void FreeBuffer(byte[] buf)
          Release buffer (no-op in java)
 void FreeInputsAfterSend()
          Set command to free input parms as soon as command is sent
 byte getCmdType()
          Get Command type
 java.lang.Object GetObjectFromInputParm(int index)
          Get serialized object from input paramter.
 java.lang.Object GetObjectFromOutputParm(int index)
          Get serialized object from output paramter.
 ServiceNode getSenderServiceNode()
          Gets the sending ServiceNode for a Command
static java.lang.String hexDump(java.lang.String indent, byte[] data)
           
 byte[] InputParm()
          Return next input parameter (autoincrement index)
 byte[] InputParm(int index)
          Return input parameter at given index, or null if not defined.
 int InputParmLength(int index)
          Return length of input parameter with given index.
 boolean IsFlatInputBuffer(byte[] buf, int off)
          Test buffer for input packet
 boolean IsFlatOutputBuffer(byte[] buf, int off)
          Test buffer for output packet
 boolean IsPostponedReply()
          Test if command has been postponed
 byte[] MakeFlatInputBuffer(int offset)
          Build a flat input buffer, and return as a byte array.
 byte[] MakeFlatOutputBuffer(int offset)
          Build a flat output buffer, and return as a byte array.
 int NumInputParms()
          Retrieve number of input parameters
 int NumOutputParms()
          Retrieve number of output parameters
 byte[] OutputParm()
          Return next output parameter (autoincrement index)
 byte[] OutputParm(int index)
          Return output parameter at given index, or null if not defined.
 int OutputParmLength(int index)
          Return length of output parameter with given index.
 void PostponeReply()
          Calling this method sets the "postpone reply" attribute to TRUE If set during the CommandReceived() method in ServiceNode, the reply for the command will not be sent until the user calls the SendPostponedReply() method.
 void ResetIndex()
          Reset current index for autoincrementing InputParm and OutputParm methods.
 void ResetInput()
          Reset command code and input parameters.
 void ResetOutput()
          Reset return code and output parameters.
 java.lang.String ReturnAddress()
          Retrieve return address string.
 long ReturnCode()
          Retrieve return code
static java.lang.String ReturnCodeToString(long rc)
           
 java.lang.String RootDestinationAddress()
          Return root of destination address (first step of address).
 java.lang.String RootReturnAddress()
          Return root of return address (first step of address).
 boolean SessionHold()
          Retrieve session hold flag
 byte SessionMode()
          Retrieve command session mode (preferred or required)
 boolean SessionRelease()
          Retrieve session release flag
 int SessionWaitTime()
          Retrieve maximum time to wait for session
 void setCmdType(byte type)
          Set Command type
 void setCmdTypeInput()
          Sets the Command type as a COMMAND_TYPE_INPUT Command
 void setCmdTypeOutput()
          Sets the Command type as a COMMAND_TYPE_OUTPUT Command
 void SetCommandCode(long cc)
          Set command code
 void setCommandCodeDebugString(java.lang.String ccds)
          Set command code debug string
 void setCommandCompleteListener(CommandCompleteListener ccl)
          Set listener for command object
 void SetDestinationAddress(java.lang.String dest)
          Set destination address string.
 void SetNewID()
          Set new command ID for command
 void SetReturnAddress(java.lang.String addr)
          Set return address string.
 void SetReturnCode(long rc)
          Set return code
 void setSenderServiceNode(ServiceNode sn)
          Sets the ServiceNode which is sending the Command
 void SetSessionHold(boolean b)
          Set session hold flag
 void SetSessionMode(byte sm)
          Set session mode
 void SetSessionRelease(boolean b)
          Set session release flag
 void SetSessionWaitTime(int t)
          Set maximum time to wait for session
 void SetTimeOut(int msec)
          Set command time-out
 int TimeOut()
          Return command time-out
 java.lang.String toString()
           
 boolean UseFlatInputBuffer(byte[] buf, int off)
           
 boolean UseFlatOutputBuffer(byte[] buf, int off)
          Use a command packet from a byte array as an output buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CMDRET_SEND_FAILED

public static final long CMDRET_SEND_FAILED
Standard return codes for communications errors

See Also:
Constant Field Values

CMDRET_SECURE_FAIL

public static final long CMDRET_SECURE_FAIL
See Also:
Constant Field Values

CMDRET_SEND_TIMEOUT

public static final long CMDRET_SEND_TIMEOUT
See Also:
Constant Field Values

CMDRET_SERVICEFAILED

public static final long CMDRET_SERVICEFAILED
See Also:
Constant Field Values

CMDRET_ENCRYPT_FAIL

public static final long CMDRET_ENCRYPT_FAIL
See Also:
Constant Field Values

CMDRET_INVALID_DEST_ADDRESS

public static final long CMDRET_INVALID_DEST_ADDRESS
See Also:
Constant Field Values

CMDRET_NO_LOCAL_SVCNODE_IMPL

public static final long CMDRET_NO_LOCAL_SVCNODE_IMPL
See Also:
Constant Field Values

CMDRET_CREATE_CMDPKT_FAILED

public static final long CMDRET_CREATE_CMDPKT_FAILED
See Also:
Constant Field Values

CMDRET_ENQUEUE_LOCAL_FAILED

public static final long CMDRET_ENQUEUE_LOCAL_FAILED
See Also:
Constant Field Values

CMDRET_SEND_BUFFER_FAILED

public static final long CMDRET_SEND_BUFFER_FAILED
See Also:
Constant Field Values

ENQUEUE_FAILED_SECURITY

public static final byte ENQUEUE_FAILED_SECURITY
See Also:
Constant Field Values

ENQUEUE_FAILED_NO_DESTPATH

public static final byte ENQUEUE_FAILED_NO_DESTPATH
See Also:
Constant Field Values

ENQUEUE_FAILED_NO_SVC_NODE_HANDLE

public static final byte ENQUEUE_FAILED_NO_SVC_NODE_HANDLE
See Also:
Constant Field Values

ENQUEUE_FAILED_NO_PROCESS_HANDLE

public static final byte ENQUEUE_FAILED_NO_PROCESS_HANDLE
See Also:
Constant Field Values

ENQUEUE_FAILED_COPYDATA

public static final byte ENQUEUE_FAILED_COPYDATA
See Also:
Constant Field Values

JNI_INITIALIZE_FAILED

public static final byte JNI_INITIALIZE_FAILED
See Also:
Constant Field Values

JNI_ENTRY_POINT_NOT_LOADED

public static final byte JNI_ENTRY_POINT_NOT_LOADED
See Also:
Constant Field Values

JNI_HANDLE_NULL

public static final byte JNI_HANDLE_NULL
See Also:
Constant Field Values

JNI_BUFFER_NULL

public static final byte JNI_BUFFER_NULL
See Also:
Constant Field Values

RMI_LOOKUP_ERROR

public static final byte RMI_LOOKUP_ERROR
See Also:
Constant Field Values

ENQUEUE_GENERAL_FAILURE

public static final byte ENQUEUE_GENERAL_FAILURE
See Also:
Constant Field Values

CMD_SENDER_FLAG

public static final long CMD_SENDER_FLAG
See Also:
Constant Field Values

CMDRET_SESS_DISABLED_LCL

public static final long CMDRET_SESS_DISABLED_LCL
See Also:
Constant Field Values

CMDRET_SESS_DISABLED_RMT

public static final long CMDRET_SESS_DISABLED_RMT
See Also:
Constant Field Values

CMDRET_SESS_UNAVAIL_LCL

public static final long CMDRET_SESS_UNAVAIL_LCL
See Also:
Constant Field Values

CMDRET_SESS_UNAVAIL_RMT

public static final long CMDRET_SESS_UNAVAIL_RMT
See Also:
Constant Field Values

CMDRET_SESS_WAIT_EXPIRED

public static final long CMDRET_SESS_WAIT_EXPIRED
See Also:
Constant Field Values

CMDRET_SESS_WAITING

public static final long CMDRET_SESS_WAITING
See Also:
Constant Field Values

CMDRET_SESS_WAIT_DONE

public static final long CMDRET_SESS_WAIT_DONE
See Also:
Constant Field Values

DEFAULT_CMD_TIMEOUT

public static final int DEFAULT_CMD_TIMEOUT
Default command timeout (15 seconds)

See Also:
Constant Field Values

SESSION_NONE

public static final byte SESSION_NONE
See Also:
Constant Field Values

SESSION_REQUIRED

public static final byte SESSION_REQUIRED
See Also:
Constant Field Values

SESSION_PREFERRED

public static final byte SESSION_PREFERRED
See Also:
Constant Field Values

COMMAND_TYPE_INPUT

public static final byte COMMAND_TYPE_INPUT
See Also:
Constant Field Values

COMMAND_TYPE_OUTPUT

public static final byte COMMAND_TYPE_OUTPUT
See Also:
Constant Field Values
Constructor Detail

Command

public Command(long cmd,
               CommandCompleteListener ccl)
Constructor for Command.

Parameters:
cmd - - command code for Command
ccl - - command complete listener

Command

public Command(long cmd)
Constructor for Command.

Parameters:
cmd - - command code for Command

Command

public Command(Command cmd)
Constructor for Command, copied from another command

Parameters:
cmd - - Command instance to copy into Command
Method Detail

CommandCode

public long CommandCode()
Retrieve command code


SetCommandCode

public void SetCommandCode(long cc)
Set command code

Parameters:
cc - - command code for Command

ReturnCode

public long ReturnCode()
Retrieve return code


SetReturnCode

public void SetReturnCode(long rc)
Set return code

Parameters:
rc - - command code for Command

SessionMode

public byte SessionMode()
Retrieve command session mode (preferred or required)


SetSessionMode

public void SetSessionMode(byte sm)
Set session mode


SessionHold

public boolean SessionHold()
Retrieve session hold flag


SetSessionHold

public void SetSessionHold(boolean b)
Set session hold flag


SessionRelease

public boolean SessionRelease()
Retrieve session release flag


SetSessionRelease

public void SetSessionRelease(boolean b)
Set session release flag


SessionWaitTime

public int SessionWaitTime()
Retrieve maximum time to wait for session


SetSessionWaitTime

public void SetSessionWaitTime(int t)
Set maximum time to wait for session


NumInputParms

public int NumInputParms()
Retrieve number of input parameters


NumOutputParms

public int NumOutputParms()
Retrieve number of output parameters


AttachInputParm

public void AttachInputParm(byte[] data)
Attach a byte buffer as an input parameter

Parameters:
data - - byte array to be accessed

AddInputParm

public void AddInputParm(byte[] data,
                         int start,
                         int length)
Add a copy of a provided buffer as an input parameter.

Parameters:
data - - byte array for input
start - - index of first character in array
length - - number of characters in array to copy

AddInputParm

public void AddInputParm(byte[] data)
Add a copy of a provided buffer as an input parameter.

Parameters:
data - - byte array for input

CompressObject

public static byte[] CompressObject(java.lang.Object obj)
                             throws java.io.NotSerializableException
Serialize and compress and object, if possible, using the shared deflater

Parameters:
obj - - Object to be serialized and compressed
Returns:
byte array containing compressed copy of serialized object
Throws:
java.io.NotSerializableException - if object cannot be serialized

AddObjectAsInputParm

public void AddObjectAsInputParm(java.lang.Object obj)
                          throws java.io.NotSerializableException
Add a serialized object (compressed) as an input parameter

Parameters:
obj - - instance of a Serializable or Externalizable object
Throws:
java.io.NotSerializableException - if object cannot be serialized

AttachOutputParm

public void AttachOutputParm(byte[] data)
Attach a byte buffer as an output parameter

Parameters:
data - - byte array to be accessed

AddOutputParm

public void AddOutputParm(byte[] data,
                          int start,
                          int length)
Add a copy of a provided buffer as an output parameter.

Parameters:
data - - byte array for output
start - - index of first character in array
length - - number of characters in array to copy

AddOutputParm

public void AddOutputParm(byte[] data)
Add a copy of a provided buffer as an output parameter.

Parameters:
data - - byte array for output

AddObjectAsOutputParm

public void AddObjectAsOutputParm(java.lang.Object obj)
                           throws java.io.NotSerializableException
Add a serialized object (compressed) as an output parameter

Parameters:
obj - - instance of a Serializable or Externalizable object
Throws:
java.io.NotSerializableException - if object cannot be serialized

DecompressObject

public static java.lang.Object DecompressObject(byte[] buf)
                                         throws java.io.ObjectStreamException,
                                                java.lang.ClassNotFoundException
Decompress and extract object, if possible, using the shared inflater

Parameters:
buf - - Byte array containing data for object
Returns:
object extracted from compressed byte stream
Throws:
java.io.ObjectStreamException - if object extraction fails
java.lang.ClassNotFoundException - if cannot find class for object

InputParm

public byte[] InputParm(int index)
Return input parameter at given index, or null if not defined.

Parameters:
index - - parameter index to request
Returns:
byte array for parameter

GetObjectFromInputParm

public java.lang.Object GetObjectFromInputParm(int index)
                                        throws java.io.ObjectStreamException,
                                               java.lang.ClassNotFoundException
Get serialized object from input paramter. This is for extracting objects passed using the AddObjectAsInputParm() method.

Parameters:
index - - parameter index to request
Returns:
object extracted from parameter
Throws:
java.io.ObjectStreamException - if object extraction fails
java.lang.ClassNotFoundException - if cannot find class for object

OutputParm

public byte[] OutputParm(int index)
Return output parameter at given index, or null if not defined.

Parameters:
index - - parameter index to request
Returns:
byte array for parameter

GetObjectFromOutputParm

public java.lang.Object GetObjectFromOutputParm(int index)
                                         throws java.io.ObjectStreamException,
                                                java.lang.ClassNotFoundException
Get serialized object from output paramter. This is for extracting objects passed using the AddObjectAsInputParm() method.

Parameters:
index - - parameter index to request
Returns:
object extracted from parameter
Throws:
java.io.ObjectStreamException - if object extraction fails
java.lang.ClassNotFoundException - if cannot find class for object

InputParmLength

public int InputParmLength(int index)
Return length of input parameter with given index.

Parameters:
index - - parameter index to request
Returns:
length of byte array for parameter

OutputParmLength

public int OutputParmLength(int index)
Return length of output parameter with given index.

Parameters:
index - - parameter index to request
Returns:
length of byte array for parameter

DetachInputParm

public byte[] DetachInputParm(int index)
Detach input parameter with given index. Command instance will no longer reference the returned byte array.

Parameters:
index - - index of input parameter to detach
Returns:
byte array for selected parameter, or null if not defined

DetachOutputParm

public byte[] DetachOutputParm(int index)
Detach output parameter with given index. Command instance will no longer reference the returned byte array.

Parameters:
index - - index of output parameter to detach
Returns:
byte array for selected parameter, or null if not defined

DestinationAddress

public java.lang.String DestinationAddress()
Return destination address string.

Returns:
string value of destination path

SetDestinationAddress

public void SetDestinationAddress(java.lang.String dest)
Set destination address string.

Parameters:
dest - - destination address string

ReturnAddress

public java.lang.String ReturnAddress()
Retrieve return address string.

Returns:
string value of return path

SetReturnAddress

public void SetReturnAddress(java.lang.String addr)
Set return address string.

Parameters:
addr - - return address string

RootDestinationAddress

public java.lang.String RootDestinationAddress()
Return root of destination address (first step of address).

Returns:
string value of first step of address

RootReturnAddress

public java.lang.String RootReturnAddress()
Return root of return address (first step of address).

Returns:
string value of first step of address

ResetInput

public void ResetInput()
Reset command code and input parameters.


ResetOutput

public void ResetOutput()
Reset return code and output parameters.


ResetIndex

public void ResetIndex()
Reset current index for autoincrementing InputParm and OutputParm methods.


InputParm

public byte[] InputParm()
Return next input parameter (autoincrement index)

Returns:
byte array for next parameter, or null if not defined

OutputParm

public byte[] OutputParm()
Return next output parameter (autoincrement index)

Returns:
byte array for next parameter, or null if not defined

MakeFlatOutputBuffer

public byte[] MakeFlatOutputBuffer(int offset)
Build a flat output buffer, and return as a byte array.

Parameters:
offset - - offset in byte array of start of output buffer
Returns:
byte array containing output buffer

MakeFlatInputBuffer

public byte[] MakeFlatInputBuffer(int offset)
Build a flat input buffer, and return as a byte array.

Parameters:
offset - - offset in byte array of start of output buffer
Returns:
byte array containing output buffer

UseFlatOutputBuffer

public boolean UseFlatOutputBuffer(byte[] buf,
                                   int off)
Use a command packet from a byte array as an output buffer

Parameters:
buf - - byte array containing command packet
off - - offset of start of command packet in buf
Returns:
true if packet successfully used, else false

UseFlatInputBuffer

public boolean UseFlatInputBuffer(byte[] buf,
                                  int off)

FreeBuffer

public static void FreeBuffer(byte[] buf)
Release buffer (no-op in java)

Parameters:
buf - - byte array

AllocateBuffer

public static byte[] AllocateBuffer(int len)
Allocate buffer (byte array)

Parameters:
len - - length of buffer, in bytes
Returns:
allocated byte array

IsFlatOutputBuffer

public boolean IsFlatOutputBuffer(byte[] buf,
                                  int off)
Test buffer for output packet

Parameters:
buf - - byte array containing packet
off - - offset in byte array of packet
Returns:
true, if valid output packet found

IsFlatInputBuffer

public boolean IsFlatInputBuffer(byte[] buf,
                                 int off)
Test buffer for input packet

Parameters:
buf - - byte array containing packet
off - - offset in byte array of packet
Returns:
true, if valid input packet found

SetNewID

public void SetNewID()
Set new command ID for command


CmdId

public final long CmdId()
Return command ID

Returns:
command ID

CommandComplete

public void CommandComplete()
Callback method invoked when command is completed. Subclasses should replace this to handle command completion.


SetTimeOut

public final void SetTimeOut(int msec)
Set command time-out

Parameters:
msec - - timeout, in milliseconds

TimeOut

public final int TimeOut()
Return command time-out

Returns:
timeout, in milliseconds NOTE: the timeout value is not sent in the Command data so a command receiver will not see the actual timeout that was set by the Command sender.

setCmdType

public final void setCmdType(byte type)
Set Command type

Parameters:
type - - type of command

getCmdType

public final byte getCmdType()
Get Command type

Returns:
cmd_type

setCmdTypeInput

public void setCmdTypeInput()
Sets the Command type as a COMMAND_TYPE_INPUT Command


setCmdTypeOutput

public void setCmdTypeOutput()
Sets the Command type as a COMMAND_TYPE_OUTPUT Command


setSenderServiceNode

public final void setSenderServiceNode(ServiceNode sn)
Sets the ServiceNode which is sending the Command

Parameters:
sn - - ServiceNode which is sending the Command

getSenderServiceNode

public final ServiceNode getSenderServiceNode()
Gets the sending ServiceNode for a Command

Returns:
senderServiceNode

PostponeReply

public final void PostponeReply()
Calling this method sets the "postpone reply" attribute to TRUE If set during the CommandReceived() method in ServiceNode, the reply for the command will not be sent until the user calls the SendPostponedReply() method. The address of the Command instance will be needed for this method, and the Command will be consumed by the call.


IsPostponedReply

public final boolean IsPostponedReply()
Test if command has been postponed

Returns:
true if command is postponed, else false

FreeInputsAfterSend

public final void FreeInputsAfterSend()
Set command to free input parms as soon as command is sent


setCommandCompleteListener

public void setCommandCompleteListener(CommandCompleteListener ccl)
Set listener for command object

Parameters:
ccl - - command complete listener

hexDump

public static final java.lang.String hexDump(java.lang.String indent,
                                             byte[] data)

ReturnCodeToString

public static final java.lang.String ReturnCodeToString(long rc)

debugPrint

public static final void debugPrint(Command cmd)

toString

public java.lang.String toString()

addToDebugStrings

public void addToDebugStrings(Vect msglist,
                              java.lang.Thread cur_thrd)
                       throws java.lang.Exception
Generate a contribution to the list of debug strings to be used for presenting the current status of the object in the given thread. If a superclass of the class implements this interface, the implementation should provide the subclasses strings first, and then invoke the superclass' method.

Parameters:
msglist - - Vect of messages : new text lines should be added using addElement()
cur_thrd - - Thread which the print stack is being generated for (may not be current thread)
Throws:
java.lang.Exception - if any error occurs

commandCodeDebugString

public java.lang.String commandCodeDebugString()
Retrieve command code debug string


setCommandCodeDebugString

public void setCommandCodeDebugString(java.lang.String ccds)
Set command code debug string

Parameters:
ccds - - command code debug string for Command