public class Messaging
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
Messaging.AsyncMessagingWorker
The worker class for composing and sending a message asynchronously
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
| Constructor and Description |
|---|
Messaging(java.lang.Integer msgty,
java.lang.Integer store)
Deprecated.
This method is replaced by
Messaging(String, Integer). It should be used
so the message type identifier does not need to be hardcoded by the application. |
Messaging(java.lang.Integer msgTypeId,
java.lang.Integer store,
java.lang.Integer priority)
Deprecated.
This method is replaced by
Messaging(String, Integer, Integer). It should be used
so the message type identifier does not need to be hardcoded by the application. |
Messaging(java.lang.String msgTypeName,
java.lang.Integer store)
Messaging constructor.
|
Messaging(java.lang.String msgTypeName,
java.lang.Integer store,
java.lang.Integer priority)
Messaging constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addAllUsersInMemberGroup(java.lang.Long mbrgrp,
CommandContext commandContext)
This method sets the internal member vector with the member group parameter.
|
void |
addContentPart(byte[] part)
This method adds a content part to the message.
|
void |
addContentPart(byte[] part,
java.lang.String name,
java.lang.String type)
This method adds a content part to the message specified by name and type.
|
void |
addMember(java.lang.Long memb)
This method sets the internal member vector with the single parameter.
|
int |
addMemberGroup(java.lang.Long mbrgrp)
Deprecated.
This method is replaced by
#addAlUsersInMemberGroup(Long, CommandContext). |
void |
addSecureMember(java.lang.Long memb)
This method adds a non-public recipient to the internal vector.
|
void |
addStore(java.lang.Integer astore_id)
Adds a store to send the message on behalf of.
|
void |
clearMember()
This method removes all members from the internal recipient list.
|
void |
compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
This method will interface with the JSP's for each transport
and return the message content to the content field.
|
void |
compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms,
java.lang.String content_type)
Deprecated.
This method is replaced by
compose(String, CommandContext, TypedProperty)
and setConfigData(String, String). |
void |
composeAsync(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
This method will interface with the JSP's for each transport in asynchronized mode
and return the message content to the content field.
|
javax.mail.internet.MimeMessage |
composeMimeMessage(WCMSRecord input)
This method will compose the MIME message
|
void |
composeSync(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
This method will interface with the JSP's for each transport in synchronized mode
and return the message content to the content field.
|
java.lang.Integer |
getArchiveFlag()
This method returns the archive flag from the transport info.
|
java.lang.String |
getConfigData(java.lang.String name)
This method will return the first value found for a given key.
|
java.lang.String |
getConfigData(java.lang.String name,
java.lang.String language)
This method will return the first NL value found for given key.
|
byte[] |
getContent(java.lang.Integer transport,
java.lang.String language)
This method is used by external users to get the content
of a message from a particular transport.
|
java.lang.Object |
getContentObject(java.lang.Integer transport,
java.lang.String language)
This method is used by external users to get the content object
of a message from a particular transport.
|
java.lang.String |
getContentType(java.lang.Integer transport,
java.lang.String language)
This method is used by external users to get the content type
of a message from a particular transport.
|
java.util.Vector |
getTransports()
This method gets the transport property (java.util.Vector) value.
|
java.lang.String |
getUserData(java.lang.Integer transport,
java.lang.String name)
This method returns the User Data attribute of the specified transport and attribute name.
|
static Messaging |
load(byte[] ser)
This public method can be used to deserialize a serialized Messaging Object
|
int |
remTransport(java.lang.Integer transport)
This method removes a target transport from the messaging system.
|
int |
sendImmediate()
This method will send the message immediately.
|
byte[] |
sendReceiveImmediate()
This method will send the message immediately and wait for a response.
|
javax.resource.cci.Record |
sendReceiveRecordImmediate()
This method will send the message immediately and wait for a response.
|
long |
sendTransacted()
This method saves the message to the MSGSTORE table if it is in synchronized mode.
|
long |
sendTransactedSync()
This method saves the message to the MSGSTORE table in the synchronized mode.
|
int |
setConfigData(java.lang.String name,
java.lang.String value)
This method will insert a name-value pair into the configuration data
of ALL transports that have the name as a key in their
hashtable.
|
int |
setConfigData(java.lang.String name,
java.lang.String language,
java.lang.String value)
This method inserts a name-value pair into the NL configuration data
of ALL transports that have the name as a key in their
hashtable.
|
int |
setContent(java.lang.Integer transport,
java.lang.String language,
byte[] content)
This method will insert the content of a message directly
for a particular transport.
|
int |
setContent(java.lang.Integer transport,
java.lang.String language,
byte[] content,
java.lang.String content_type)
Deprecated.
This method is replaced by
setContent(Integer, String, byte[])
and setConfigData(String, String). |
int |
setContent(java.lang.Integer transport,
java.lang.String language,
java.lang.Object object)
This method will insert the content object directly
for a particular transport.
|
int |
setContent(java.lang.Integer transport,
java.lang.String language,
javax.resource.cci.Record record)
This method will insert the message record directly
for a particular transport.
|
int |
setLowPriorityConfigData(java.lang.String name,
java.lang.String value)
This method will insert a name-value pair into the configuration data
of ALL transports that have the name as a key in their
hashtable.
|
int |
setLowPriorityConfigData(java.lang.String name,
java.lang.String language,
java.lang.String value)
This method inserts a name-value pair into the NL configuration data
of ALL transports that have the name as a key in their
hashtable.
|
void |
setNotificationID(java.lang.Long notifyID)
This method sets the notification ID and replaces any default value
using the data in the notification object (from the database).
|
void |
setPartialSend(java.lang.Boolean newPartialSend)
This method sets the partial send flag.
|
int |
setUserData(java.lang.Integer transport,
java.lang.String name,
java.lang.String value)
This method sets the user data for the specified transport.
|
public static final java.lang.String COPYRIGHT
public Messaging(java.lang.String msgTypeName,
java.lang.Integer store)
throws ECException,
java.lang.NullPointerException
msgTypeName - The message type, part of the key used to access Admin informationstore - The store, part of the key used to access Admin informationECException - Raised with message _ERR_ADM_FINDEREXCEPTION when a request object is not found.
Raised with message _ERR_ACCESS_STORE when a request object is not found.java.lang.NullPointerException - Raised if the message type is nullpublic Messaging(java.lang.String msgTypeName,
java.lang.Integer store,
java.lang.Integer priority)
throws ECException,
java.lang.NullPointerException
msgTypeName - The message type, part of the key used to access Admin informationstore - The store, part of the key used to access Admin informationpriority - The priority, used to filter table accessECException - Raised with message _ERR_ADM_FINDEREXCEPTION when a request object is not found.
Raised with message _ERR_ACCESS_STORE when a request object is not found.java.lang.NullPointerException - Raised if the message type is nullpublic Messaging(java.lang.Integer msgty,
java.lang.Integer store)
throws ECSystemException,
java.lang.NullPointerException
Messaging(String, Integer). It should be used
so the message type identifier does not need to be hardcoded by the application.msgty - The message type, part of the key used to access Admin informationstore - The store, part of the key used to access Admin informationECSystemException - Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found.
Raised with message _ERR_ACCESS_STORE whenever a request object is not found.java.lang.NullPointerException - Raised if the message type is null.public Messaging(java.lang.Integer msgTypeId,
java.lang.Integer store,
java.lang.Integer priority)
throws ECSystemException,
java.lang.NullPointerException
Messaging(String, Integer, Integer). It should be used
so the message type identifier does not need to be hardcoded by the application.msgTypeId - The message type, part of the key used to access Admin informationstore - The store, part of the key used to access Admin informationpriority - The priority, used to filter table accessECSystemException - Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found.
Raised with message _ERR_ACCESS_STORE whenever a request object is not found.java.lang.NullPointerException - Raised if the message type is nullpublic void addContentPart(byte[] part)
part - The content part to add as a byte[].public void addContentPart(byte[] part,
java.lang.String name,
java.lang.String type)
part - The content part to addname - The name of the part to add (example filename)type - The type of the part (for example the MIME type (text/plain) in JavaMail).public void addMember(java.lang.Long memb)
throws ECSystemException
memb - The member group.ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.public int addMemberGroup(java.lang.Long mbrgrp)
throws ECSystemException
#addAlUsersInMemberGroup(Long, CommandContext).mbrgrp - The member group.ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.public int addAllUsersInMemberGroup(java.lang.Long mbrgrp,
CommandContext commandContext)
throws ECSystemException
mbrgrp - The member group.commandContext - The command context that have the current store id.ECSystemException - Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.public void addSecureMember(java.lang.Long memb)
throws ECSystemException
memb - The member group.ECSystemException - The exception description.
Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.public void addStore(java.lang.Integer astore_id)
throws ECSystemException
astore_id - The store identifierECSystemException - The exception description.
Raised with message _ERR_ACCESS_USER_BEAN whenever a request object is not found.public void clearMember()
public void compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
throws ECSystemException
AddMember*(Long) and AddSecureMember(Long) has
not been called, this method requires the correct
language ID to be set inside the command context object.view - The view namecomContext - The command contextinparms - The request propertyECSystemException - The exception description.
Raised with message _ERR_EXEC_COMPOSE whenever an error occurs while composing the message.
Raised with message _ERR_CCF2JM_GENERIC_EXCEPTION whenever a generic exception occurs.public void composeAsync(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
throws ECSystemException
view - The view namecomContext - The command contextinparms - The input parametersECSystemExceptionpublic void composeSync(java.lang.String view,
CommandContext comContext,
TypedProperty inparms)
throws ECSystemException
AddMember*(Long) and AddSecureMember(Long) has
not been called, this method requires the correct
language ID to be set inside the command context object.view - The view namecomContext - The command contextinparms - The request propertyECSystemException - The exception description.
Raised with message _ERR_EXEC_COMPOSE whenever an error occurs while composing the message.
Raised with message _ERR_CCF2JM_GENERIC_EXCEPTION whenever a generic exception occurs.public void compose(java.lang.String view,
CommandContext comContext,
TypedProperty inparms,
java.lang.String content_type)
throws ECSystemException
compose(String, CommandContext, TypedProperty)
and setConfigData(String, String).AddMember*(Long) and AddSecureMember(Long) has
not been called, this method requires the correct
language ID to be set inside the command context object.view - The view name associated with this messagecomContext - The command contextinparms - The request propertycontent_type - The message content type which is used by JavaMail.ECSystemException - Raised with message _ERR_EXEC_COMPOSE whenever an error occurs while composing the message.
Raised with message _ERR_CCF2JM_GENERIC_EXCEPTION whenever a generic exception occurs.public javax.mail.internet.MimeMessage composeMimeMessage(WCMSRecord input) throws ECSystemException
input - The input recordECSystemException - Raised with message _ERR_EXEC_COMPOSE whenever an error occurs creating the MIME message.public java.lang.String getConfigData(java.lang.String name)
throws ECSystemException
name - The attribute name.ECSystemException - Raised with message _ERR_MSGTRANS_NOT_INIT whenever the hashtable containing
the configuration data is null.public java.lang.String getConfigData(java.lang.String name,
java.lang.String language)
throws ECSystemException
name - The attribute name.language - The language idECSystemException - Raised with message _ERR_MSGTRANS_NOT_INIT whenever the hashtable containing
the configuration data is null.public java.lang.String getContentType(java.lang.Integer transport,
java.lang.String language)
throws ECSystemException
transport - The transport identifierlanguage - The language IDECSystemException - The exception description.
Raised with ArrayIndexOutOfBoundsException whenever an exception occurs while accessing the transport arraypublic byte[] getContent(java.lang.Integer transport,
java.lang.String language)
throws ECSystemException
transport - The transport identifierlanguage - The language IDECSystemException - The exception description.
Raised with ArrayIndexOutOfBoundsException whenever there is an error
accessing the transport arraypublic java.lang.Object getContentObject(java.lang.Integer transport,
java.lang.String language)
throws ECSystemException
transport - java.lang.Integer The transport.language - java.lang.String The language IDECSystemException - The exception description.
Raised with ArrayIndexOutOfBoundsException whenever there is an error
accessing the transport arraypublic java.util.Vector getTransports()
public java.lang.String getUserData(java.lang.Integer transport,
java.lang.String name)
throws ECSystemException
transport - The transport.name - The attribute name.ECSystemException - The exception description.
Raised with message _ERR_MSGTRANS_NOT_INIT whenever the message transport is not found.public static Messaging load(byte[] ser) throws java.io.IOException, java.lang.ClassNotFoundException
ser - The byte array used to build the messaging objectjava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic int remTransport(java.lang.Integer transport)
transport - The transport to remove.public int sendImmediate()
throws ECSystemException
ECSystemException - Raised with message _ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is null.
Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found.
Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured.
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured.public byte[] sendReceiveImmediate()
throws ECSystemException
ECSystemException - Raised with message _ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is null.
Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found.
Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured.
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured.public javax.resource.cci.Record sendReceiveRecordImmediate()
throws ECSystemException
ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.
Raised with message _ERR_CCF2JM_CDATA_NULLCONTENT whenever the input byte[] parameter is null.
Raised with message _ERR_UNSUPPORTED_ENCODING whenever an unsupported encoding exception occurs.
Raised with message _ERROR_JCA_NULL_JNDI whenever the JNDI name is either null or empty.
Raised with message _ERR_GENERIC whenever a generic error occurs.
Raised with message _ERROR_MSG_RESOURCE_EXCEPTION whenever a resource exception occurs.public long sendTransacted()
throws ECSystemException
ECSystemException - The exception description.public long sendTransactedSync()
throws ECSystemException
ECSystemException - The exception description.public int setConfigData(java.lang.String name,
java.lang.String value)
throws ECSystemException
name - The attribute name.value - The attribute value.ECSystemException - The exception description.public int setConfigData(java.lang.String name,
java.lang.String language,
java.lang.String value)
throws ECSystemException
name - The attribute name.language - The language IDvalue - The attribute value.ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.public int setLowPriorityConfigData(java.lang.String name,
java.lang.String value)
throws ECSystemException
name - The attribute name.value - The attribute value.ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.public int setLowPriorityConfigData(java.lang.String name,
java.lang.String language,
java.lang.String value)
throws ECSystemException
name - The attribute name.language - The language id.value - The attribute value.ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.public int setContent(java.lang.Integer transport,
java.lang.String language,
byte[] content)
transport - The Transport identifierlanguage - The language IDcontent - The content of the message to be set.public int setUserData(java.lang.Integer transport,
java.lang.String name,
java.lang.String value)
throws ECSystemException
transport - The transport.identifiername - The attribute name.value - The attribute value.ECSystemException - Raised with message _ERR_MSG_CFG_NOT_INIT whenever the messaging configuration data cannot be initialized.public int setContent(java.lang.Integer transport,
java.lang.String language,
java.lang.Object object)
transport - The transport identifierlanguage - The language IDobject - The MimeMultipart for JavaMail.public int setContent(java.lang.Integer transport,
java.lang.String language,
byte[] content,
java.lang.String content_type)
setContent(Integer, String, byte[])
and setConfigData(String, String).transport - The transport identifierlanguage - The language IDcontent - The content of the message to be setcontent_type - The content type of the message to be setpublic int setContent(java.lang.Integer transport,
java.lang.String language,
javax.resource.cci.Record record)
transport - The Transport identifierlanguage - The language IDrecord - The input record which contains message.public java.lang.Integer getArchiveFlag()
public void setNotificationID(java.lang.Long notifyID)
throws ECSystemException
notifyID - is used to identify a notification object (may
apply to multiple msgtypes and transports in the database).ECSystemException - Raised with message _ERR_ADM_FINDEREXCEPTION whenever a request object is not found.
Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a failure to look up the JNDI name occured.
Raised with message _ERR_ADM_CREATEEXCEPTION whenever a failure to create the EJB occured.public void setPartialSend(java.lang.Boolean newPartialSend)
newPartialSend - boolean indicating if the message is to be partially sent or not.