com.extrememessaging.ResponseMaster.MessageFields
Class AttachmentOfType

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

public class AttachmentOfType
extends java.lang.Object
implements IMessageField

The class that finds an attachment of a particular type

See Also:
IMessageField

Constructor Summary
AttachmentOfType()
           
 
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 oMsg)
          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

AttachmentOfType

public AttachmentOfType()
Method Detail

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

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 oMsg)
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.
oMsg - 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.

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

Verify

public void Verify()
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
See Also:
InvalidMessageFieldName, IllegalArgumentException