com.ibm.websphere.sca.jms.data
Interface JMSDataBinding
All Superinterfaces:
commonj.connector.runtime.DataBinding, java.io.Serializable
All known subinterfaces:
All known implementing classes:
- public interface JMSDataBinding
- extends commonj.connector.runtime.DataBinding
This interface is an extension of commonj.connector.runtime.DataBinding, and presents a JMS-specific view which should be implemented for use in JMS Exports and Imports.
It exposes methods which read and write to and from a JMS message, as well as exporting which type of JMS message is supported.
See Also:
DataBinding
Field Summary
Modifier and Type | Field and Description |
---|---|
|
$sccsid
|
|
ANY_MESSAGE
|
|
BASE_MESSAGE
|
|
BYTES_MESSAGE
|
|
COPYRIGHT
|
|
MAP_MESSAGE
|
|
OBJECT_MESSAGE
|
|
STREAM_MESSAGE
|
|
TEXT_MESSAGE
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getMessageType()
Return the message type that is supported by this data
binding.
|
|
isBusinessException()
Queries the DataBinding to determine whether the received
message contains a fault (carried within a
BusinessException).
|
|
read(javax.jms.Message message)
Read the contents of the incoming JMS Message into a
DataObject.
|
|
setBusinessException(boolean isBusinessException)
This method is called by the runtime if the outgoing message
contains a BusinessException.
|
|
write(javax.jms.Message message)
Write the DataObject into an outgoing JMS Message.
|
Methods inherited from interface commonj.connector.runtime.DataBinding |
---|
getDataObject, setDataObject |
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
See Also:
$sccsid
- static final java.lang.String $sccsid
See Also:
ANY_MESSAGE
- static final int ANY_MESSAGE
See Also:
OBJECT_MESSAGE
- static final int OBJECT_MESSAGE
See Also:
TEXT_MESSAGE
- static final int TEXT_MESSAGE
See Also:
BYTES_MESSAGE
- static final int BYTES_MESSAGE
See Also:
STREAM_MESSAGE
- static final int STREAM_MESSAGE
See Also:
MAP_MESSAGE
- static final int MAP_MESSAGE
See Also:
BASE_MESSAGE
- static final int BASE_MESSAGE
See Also:
Method Detail
getMessageType
- int getMessageType()
Return the message type that is supported by this data
binding. Message type is one of the following types:
- ANY_MESSAGE
- OBJECT_MESSAGE
- TEXT_MESSAGE
- BYTES_MESSAGE
- STREAM_MESSAGE
- MAP_MESSAGE
- BASE_MESSAGE
Returns:
Message type, represented by one of the static
integer definitions above.
read
- void read(javax.jms.Message message)
- throws javax.jms.JMSException
Read the contents of the incoming JMS Message into a
DataObject. Called before the
getDataObject
method is called by the runtime. An implementation of this
method will process the payload of the incoming JMS message
and will parse the data into the appropriate DataObject,
created like this: BOFactory bof =
(BOFactory)ServiceManager.INSTANCE.locateService("com/ibm/websphere/bo/BOFactory");
sampleBO = bof.create("http://namespace", "BOName");
Parameters:
message
- The message whose payload is to be parsed. Throws:
javax.jms.JMSException
- Thrown if an error occurs
during reading of the message. write
- void write(javax.jms.Message message)
- throws javax.jms.JMSException
Write the DataObject into an outgoing JMS Message. Called
after the
setDataObject
method is called by the
runtime. The supplied message must be of the same type as
returned by getMessageType
. This method will
be the converse of the read
method, and will
serialize the contents of the DataObject the the wire format
in the JMS message.
Parameters:
message
- The message to be populated with the
serialized DataObject. Throws:
javax.jms.JMSException
- Thrown if an error occurs
during writing of the message. isBusinessException
- boolean isBusinessException()
Queries the DataBinding to determine whether the received
message contains a fault (carried within a
BusinessException).
Returns:
A boolean value stating whether the message payload
is a fault.
setBusinessException
- void setBusinessException(boolean isBusinessException)
This method is called by the runtime if the outgoing message
contains a BusinessException. An implementation of this
method may set some internal state if this information is
important to propagate - and in this case, the interanl state
will be acted on by the write() method.
Parameters:
isBusinessException
- True or false, specified by the
caller.