|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.wfxml.WfXMLMessage
com.groiss.wfxml.GenericMessage
public class GenericMessage
The generic message is not defined in the WfXML specification. It has been invented mainly for communication between passive and active @enterprise servers. Anyway, it can also be used to transfer any kind of data or information. Generic messages are parameter-based. You can specify as many arbitrary parameters and values as you want.
| Field Summary | |
|---|---|
protected static java.lang.String |
MSG_BODY_GEN
|
| Constructor Summary | |
|---|---|
protected |
GenericMessage(org.jdom.Document doc)
Use this constructor to create a GenericMessage out of an existing JDOM document. |
|
GenericMessage(short messageType)
This constructor initializes a new empty GenericMessage message. |
| Method Summary | |
|---|---|
void |
addParameter(java.lang.String parameterName,
java.lang.String value)
This method adds a value for a parameter to this message. |
java.lang.String |
getParameter(java.lang.String parameterName)
Use this method to retrieve a simple text parameter, which has been set with setParameter(String, String) before. |
java.util.List |
listParameterValueStrings(java.lang.String parameterName)
Returns a List containing all values of the parameter named
parameterName. |
void |
prepare(Partner partner)
Preparing the message for being sent. |
void |
setMessageType(short type)
Set the message type of this WfXML message (in the message header). |
void |
setParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Use this method for setting a parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String MSG_BODY_GEN
| Constructor Detail |
|---|
public GenericMessage(short messageType)
messageType - Set the message type to either WfXMLMessage.REQUEST or
WfXMLMessage.RESPONSE.protected GenericMessage(org.jdom.Document doc)
doc - A JDOM Document element.| Method Detail |
|---|
public void setMessageType(short type)
throws java.lang.IllegalArgumentException
WfXMLMessage
setMessageType in class WfXMLMessagetype - Use the constants WfXMLMessage.REQUEST or WfXMLMessage.RESPONSE
as value for this parameter, depending on if you want to create
a request or a response message.
java.lang.IllegalArgumentException - If type is illegal.
public void addParameter(java.lang.String parameterName,
java.lang.String value)
parameterName set.
parameterName - The name of the parameter for which you want to add
a value.value - The value you want to add to this parameter.public java.util.List listParameterValueStrings(java.lang.String parameterName)
List containing all values of the parameter named
parameterName.
parameterName - The name of the parameter for which you want to receive
values.
public void setParameter(java.lang.String parameterName,
java.lang.String parameterValue)
addParameter method instead.
parameterName - Name of the parameter that you want to set.parameterValue - The value for the parameter.public java.lang.String getParameter(java.lang.String parameterName)
setParameter(String, String) before. Take
care: if you use this method to access a parameter which contains multiple
values, you will only retrieve one of these values with this method! If you
want to get all the values of such a multiple-value parameter, use the
listParameterValueStrings method instead.
parameterName - The name of the parameter you are searching for.
String containing the value of the
parameter, or null if the parameter was not found in the
message.public void prepare(Partner partner)
Sender before the message is sent. So you never need to call it
manually.
prepare in class WfXMLMessagepartner - The partner server to which the message will be sent.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||