com.extrememessaging.ResponseMaster.MessageFields
Class StatusCode

java.lang.Object
  extended by com.extrememessaging.ResponseMaster.MessageFields.StatusCode
All Implemented Interfaces:
IConfigurableItem, IMessageField

public class StatusCode
extends java.lang.Object
implements IMessageField


Constructor Summary
StatusCode()
           
 
Method Summary
 java.lang.Object GetValue()
          Get the value of the field
 void Initialize(java.lang.String parameter)
          Initialize using the parameter from the config file.
 void PassMessages(CMessage parentMessage, javax.mail.Message javaMailMsg)
          Called once for each message.
 void SetValue(java.lang.Object newValue)
          Called if the value for this field is set externally.
 void Shutdown()
          Cleanup any resources you allocated during construction or operation.
 void Verify()
          This function is called once, just after the first time Initialize is called.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusCode

public StatusCode()
Method Detail

Verify

public void Verify()
            throws InvalidMessageFieldName
Description copied from interface: IMessageField
This function is called once, just after the first time Initialize is called. It is used to determine if any dependencies are missing or the parameter is invalid. It throws an exception if something is wrong.

Specified by:
Verify in interface IMessageField
Throws:
InvalidMessageFieldName
See Also:
InvalidMessageFieldName, IllegalArgumentException

Initialize

public void Initialize(java.lang.String parameter)
                throws ResponseMasterException
Description copied from interface: IConfigurableItem
Initialize using the parameter from the config file. Frequently, the parameter will be a file name

Specified by:
Initialize in interface IConfigurableItem
Throws:
ResponseMasterException

Shutdown

public void Shutdown()
Description copied from interface: IConfigurableItem
Cleanup any resources you allocated during construction or operation. After this is called, nothing else will be called, unless Initialize is called again. Note: Shutdown may be called more than once on the same object New in build 595.

Specified by:
Shutdown in interface IConfigurableItem

GetValue

public java.lang.Object GetValue()
Description copied from interface: IMessageField
Get the value of the field

Specified by:
GetValue in interface IMessageField
Returns:
The value of the field. It should have the type set in the DataTypeClassName field of the MessageFields.xml file. It is ok to return null.

PassMessages

public void PassMessages(CMessage parentMessage,
                         javax.mail.Message javaMailMsg)
                  throws javax.mail.MessagingException
Description copied from interface: IMessageField
Called once for each message. Called after Initialize, before GetValue and SetValue Passes the information you may need to get your value

Specified by:
PassMessages in interface IMessageField
Parameters:
parentMessage - Do NOT use the parentMessage in this call. You can store a reference to it to use later in GetValue, but do not access the values of any other fields during this function.
javaMailMsg - The raw Java Mail message that the parentMessage is based upon You can freely read from this object, but do not modify it. If it throws a messaging exception that you cannot handle, you should re-throw it to let ResponseMaster re-cycle the connection to the mail server.
Throws:
javax.mail.MessagingException

SetValue

public void SetValue(java.lang.Object newValue)
Description copied from interface: IMessageField
Called if the value for this field is set externally. It you are implementing your own message fields, this call shouldn't need to do anything

Specified by:
SetValue in interface IMessageField