|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.osesb.msgrouting.BrokerErrorMessage
public class BrokerErrorMessage
Ancestor for BrokerErrorMessage(s).
A BrokerErrorMessage is returned to the service requestor by a transport handler when an exception occurs during message processing and the requestor expects a reply. See the org.osesb.transporthandlers package in the transport-handlers module. A standard broker error message XML looks like:<err:brokerError xmlns:err="http://www.osesb.org/brokerError">
<dateTime>24 Feb 2007 04:22:02</dateTime>
<exceptionClassification>testException</exceptionClassification>
<relatesToMessageType namespaceURI="www.osesb.org" localPart="testMessage" />
<relatesToMessageID>1234</relatesToMessageID>
<errorMessage>org.osesb.messagepipeline.PipelineStageException:
exceptionClassification: testException
pipelineName: testMessagePipeline
pipelineConfigFile: org/osesb/messagepipeline/test/testdata/message-pipeline-test-config.xml
pipelineStageName: JMSClientPipelineStage-asynch
pipelineStageConfigFile: org/osesb/messagepipeline/test/testdata/jmssender-pipeline-stage-aynch-test-config.xml
pipelineStageClassName: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage
EAIMessage messageType: {www.osesb.org}testMessage
exceptionMessage: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage.runStage(): Exception sending JMS Message with the contents of the EAIMessage. Exception: This is a test PipelineStageException.</errorMessage>
</err:brokerError>
This class encapsulates the properties that compose a
BrokerErrorMessage and includes the following operative
methods:
| Field Summary | |
|---|---|
protected static java.lang.String |
BROKER_ERRORMESSAGE_NAMESPACEPREFIX
The default namespace prefix for the XML error message generated by BrokerErrorMessage#toXML(). |
protected static java.lang.String |
BROKER_ERRORMESSAGE_NAMESPACEURI
The default namespaceURI for the XML error message generated by BrokerErrorMessage#toXML(). |
protected static java.lang.String |
BROKER_ERRORMESSAGE_ROOTTAGNAME
The default tagName for the root Element of the XML generated by BrokerErrorMessage#toXML(). |
protected java.lang.String |
errorMessage
The error message for this BrokerErrorMessage. |
protected java.util.Date |
errorMessageCreateDateTime
A Date object representing the date-time that the BrokerErrorMessage was created. |
protected java.lang.String |
errorTimestampFormat
The format for the timestamp element in the XML generated by toXML(). |
protected java.lang.String |
exceptionClassification
A classification for the BrokerErrorMessage. |
protected java.lang.String |
relatesToMessageID
This is the message ID of the message that was sent to osESB that this BrokerErrorMessage relates to. |
protected javax.xml.namespace.QName |
relatesToMessageType
The message type of the message that was sent to the broker that this BrokerErrorMessage relates to. |
protected static java.util.Map |
standardPropertyNames
fromXML() must distinguish between standard BrokerErrorMessage properties and extended properties. |
protected java.lang.String |
thisClassName
The full name of this class. |
| Constructor Summary | |
|---|---|
BrokerErrorMessage(java.lang.String errorMessage)
Construct instance of BrokerErrorMessage. |
|
| Method Summary | |
|---|---|
static BrokerErrorMessage |
fromXML(java.lang.String brokerErrorXML)
Creates a new BrokerErrorMessage object from the given broker error XML, which looks like: |
java.lang.String |
getErrorMessage()
Return the error message for this BrokerErrorMessage. |
java.util.Date |
getErrorMessageCreateDateTime()
Get the Date object representing the date-time that the BrokerErrorMessage was created. |
java.lang.String |
getErrorTimestampFormat()
Get the timestamp format for the XML error message generated by toXML(). |
java.lang.String |
getExceptionClassification()
Get the classification for the BrokerErrorMessage. |
java.util.Properties |
getExtendedProperties()
Return the extended Properties for this BrokerErrorMessage. |
java.lang.String |
getExtendedProperty(java.lang.String propertyName)
Return an extended Property by name. |
java.lang.String |
getRelatesToMessageID()
Get the message ID of the originating message that was sent to osESB that this BrokerErrorMessage relates to. |
javax.xml.namespace.QName |
getRelatesToMessageType()
Get the message type (QName) of the originating message that was sent to osESB that this BrokerErrorMessage relates to. |
static boolean |
isBrokerErrorMessage(java.lang.String xmlText)
Returns true if the given XML is broker error message XML. |
static void |
main(java.lang.String[] args)
main(): For testing and sandboxing. |
void |
setErrorTimestampFormat(java.lang.String errorTimestampFormat)
Set the timestamp format for the XML error message generated by toXML(). |
void |
setExceptionClassification(java.lang.String exceptionClassification)
Set the classification for the BrokerErrorMessage. |
void |
setExtendedProperties(java.util.Properties extendedProperties)
Set the extended Properties for this BrokerErrorMessage. |
void |
setExtendedProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Set an extended Property by name. |
void |
setRelatesToMessageID(java.lang.String relatesToMessageID)
Set the message ID of the originating message that was sent to osESB that this BrokerErrorMessage relates to. |
void |
setRelatesToMessageType(javax.xml.namespace.QName relatesToMessageType)
Set the message type (QName) of the originating message that was sent to osESB that this BrokerErrorMessage relates to. |
java.lang.String |
toXML()
Generates a broker XML error message from this BrokerErrorMessage that looks like: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String thisClassName
protected java.lang.String exceptionClassification
protected java.lang.String errorMessage
protected javax.xml.namespace.QName relatesToMessageType
protected java.lang.String relatesToMessageID
<wsa:MessageID> entry
in the SOAPHeader of the SOAPMessage that was received
by osESB.
protected java.util.Date errorMessageCreateDateTime
protected java.lang.String errorTimestampFormat
protected static java.util.Map standardPropertyNames
protected static java.lang.String BROKER_ERRORMESSAGE_ROOTTAGNAME
protected static java.lang.String BROKER_ERRORMESSAGE_NAMESPACEURI
protected static java.lang.String BROKER_ERRORMESSAGE_NAMESPACEPREFIX
| Constructor Detail |
|---|
public BrokerErrorMessage(java.lang.String errorMessage)
| Method Detail |
|---|
public java.lang.String toXML()
throws java.lang.Exception
<err:brokerError xmlns:err="http://www.osesb.org/brokerError">
<dateTime>16 Feb 2007 04:49:24</dateTime>
<exceptionClassification>testException</exceptionClassification>
<relatesToMessageType namespaceURI="www.osesb.org" localPart="testMessage" />
<relatesToMessageID>1234</relatesToMessageID>
<errorMessage>org.osesb.messagepipeline.PipelineStageException:
exceptionClassification: testException
pipelineName: testMessagePipeline
pipelineConfigFile: org/osesb/messagepipeline/test/testdata/message-pipeline-test-config.xml
pipelineStageName: JMSClientPipelineStage-asynch
pipelineStageConfigFile: org/osesb/messagepipeline/test/testdata/jmssender-pipeline-stage-aynch-test-config.xml
pipelineStageClassName: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage
EAIMessage messageType: {www.osesb.org}testMessage
exceptionMessage: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage.runStage(): Exception sending JMS Message with the contents of the EAIMessage. Exception: This is a test PipelineStageException.</errorMessage>
</err:brokerError>
java.lang.Exception - if There is a problem constructing a
broker error XML Message.
public static BrokerErrorMessage fromXML(java.lang.String brokerErrorXML)
throws java.lang.Exception
<err:brokerError xmlns:err="http://www.osesb.org/brokerError">
<dateTime>16 Feb 2007 04:49:24</dateTime>
<exceptionClassification>testException</exceptionClassification>
<relatesToMessageType namespaceURI="www.osesb.org" localPart="testMessage" />
<relatesToMessageID>1234</relatesToMessageID>
<errorMessage>org.osesb.messagepipeline.PipelineStageException:
exceptionClassification: testException
pipelineName: testMessagePipeline
pipelineConfigFile: org/osesb/messagepipeline/test/testdata/message-pipeline-test-config.xml
pipelineStageName: JMSClientPipelineStage-asynch
pipelineStageConfigFile: org/osesb/messagepipeline/test/testdata/jmssender-pipeline-stage-aynch-test-config.xml
pipelineStageClassName: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage
EAIMessage messageType: {www.osesb.org}testMessage
exceptionMessage: org.osesb.messagepipeline.builtinstages.JMSClientPipelineStage.runStage(): Exception sending JMS Message with the contents of the EAIMessage. Exception: This is a test PipelineStageException.</errorMessage>
</err:brokerError>
java.lang.Exception - if There is a problem constructing a BrokerErrorMessage object
from a broker error XML Message.
public static boolean isBrokerErrorMessage(java.lang.String xmlText)
throws java.lang.Exception
xmlText - The XML to test.
java.lang.Exception - if xmlText cannot be parsed.public java.lang.String getErrorMessage()
public java.lang.String getExceptionClassification()
public void setExceptionClassification(java.lang.String exceptionClassification)
public javax.xml.namespace.QName getRelatesToMessageType()
public void setRelatesToMessageType(javax.xml.namespace.QName relatesToMessageType)
relatesToMessageType - The message type of the originating
message that was sent to osESB that this BrokerErrorMessage
relates to.public java.lang.String getRelatesToMessageID()
public void setRelatesToMessageID(java.lang.String relatesToMessageID)
relatesToMessageID - The message ID of the originating
message that was sent to osESB that this BrokerErrorMessage
relates to.public java.util.Date getErrorMessageCreateDateTime()
public void setErrorTimestampFormat(java.lang.String errorTimestampFormat)
public java.lang.String getErrorTimestampFormat()
public java.util.Properties getExtendedProperties()
public void setExtendedProperties(java.util.Properties extendedProperties)
extendedProperties - The extended Properties for this BrokerErrorMessage.public java.lang.String getExtendedProperty(java.lang.String propertyName)
public void setExtendedProperty(java.lang.String propertyName,
java.lang.String propertyValue)
propertyName - The Property name.propertyValue - The Property value.public static void main(java.lang.String[] args)
args - commandline arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||