|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.transport.SimpleRequestMessage
public class SimpleRequestMessage
A basic implementation of a message that can be sent across a transport layer. Allows the message to be accessed as a string or as a Document.
Must make use of static creation methods in order to construct a SimpleRequestMessage.
Method Summary | |
---|---|
static RequestMessage |
create(Document message)
Create a message object based on a Document. |
static RequestMessage |
create(Document messageAsDocument,
String messageAsString)
Create a message object based on a Document and string representation. |
static RequestMessage |
create(String message)
Create a message object based on a string. |
String |
getInteractionId()
Obtains the message's interaction id. |
Document |
getMessageAsDocument()
Obtains the message as a DOM, converting the underlying structure if necessary (i.e. |
String |
getMessageAsString()
Obtains the message as a string, converting the underlying structure if necessary (i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getInteractionId() throws TransportLayerException
Obtains the message's interaction id.
getInteractionId
in interface RequestMessage
TransportLayerException
- if the message's interaction id could not be determinedpublic Document getMessageAsDocument() throws TransportLayerException
Obtains the message as a DOM, converting the underlying structure if necessary (i.e. string -> DOM).
getMessageAsDocument
in interface RequestMessage
TransportLayerException
- if there were problems creating the DOMpublic String getMessageAsString() throws TransportLayerException
Obtains the message as a string, converting the underlying structure if necessary (i.e. DOM -> string).
getMessageAsString
in interface RequestMessage
TransportLayerException
- if a string representation of the message could not be constructedpublic static RequestMessage create(String message) throws TransportLayerException
Create a message object based on a string.
message
- the message as a string
TransportLayerException
- if the message could not be converted into a Documentpublic static RequestMessage create(Document message) throws TransportLayerException
Create a message object based on a Document.
message
- the message as a Document
TransportLayerException
- if the message could not be rendered as a stringpublic static RequestMessage create(Document messageAsDocument, String messageAsString) throws TransportLayerException
Create a message object based on a Document and string representation.
messageAsDocument
- the message as a DocumentmessageAsString
- the message as a string
TransportLayerException
- if the message could not be constructed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |