|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MQBodyDataBinding
A DataBinding represents the mapping between a native data format and an SDO DataObject, and vice-versa.
This interface is an extension of commonj.connector.runtime.DataBinding, and presents a WMQ-specific view which should be implemented for use in WMQ Exports and Imports.
It exposes methods which read and write to and from a WMQ message, as well as exporting which format of WMQ message is supported.
DataBinding
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
java.lang.String |
getFormat()
Called by the runtime to determine the WMQ header format supported by this DataBinding. |
boolean |
isBusinessException()
Queries the DataBinding to determine whether the received message contains a fault (carried within a BusinessException). |
void |
read(MQMD md,
java.util.List headers,
MQDataInputStream input)
Read the contents of the incoming WMQ message components into a DataObject. |
void |
setBusinessException(boolean isBusinessException)
This method is called by the runtime if the outgoing message contains a BusinessException. |
void |
setFormat(java.lang.String format)
Called before both the read and
write methods, and contains the MQ format string
identifying the format of the WMQ message body. |
void |
write(MQMD md,
java.util.List headers,
MQDataOutputStream output)
Write the DataObject into an outgoing WMQ message. |
Methods inherited from interface commonj.connector.runtime.DataBinding |
---|
getDataObject, setDataObject |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
void read(MQMD md, java.util.List headers, MQDataInputStream input) throws java.io.IOException
getDataObject
method is called by the runtime. An implementation of this
method will process the payload of the incoming WMQ message
(as well as the headers, if required) by reading from the
supplied input stream. It will then 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");
md
- The SDO representation of the MQMD of the incoming
WMQ message.headers
- The list (possibly empty) of SDO
representations of other WMQ headers in the
incoming WMQ message, e.g. RFH, RFH2.input
- The input stream wrapping the payload of the
incoming WMQ message.
java.io.IOException
- Thrown if an error occurs
during reading of the WMQ message.void write(MQMD md, java.util.List headers, MQDataOutputStream output) throws java.io.IOException
setDataObject
method is called by the
runtime.
This method will be the converse of the read
method, and will serialize the contents of the DataObject the
the wire format in the WMQ message by writing to the supplied
output stream.
md
- The SDO representation of the MQMD to be written to
the outgoing WMQ message.headers
- The list (possibly empty) of SDO
representations of other WMQ headers to be
written to the outgoing WMQ message, e.g. RFH,
RFH2.output
- The output stream wrapping the outgoing WMQ
message.
java.io.IOException
- Thrown if an error occurs
during writing of the WMQ message.void setBusinessException(boolean isBusinessException)
isBusinessException
- True or false, specified by the
caller.boolean isBusinessException()
void setFormat(java.lang.String format)
read
and
write
methods, and contains the MQ format string
identifying the format of the WMQ message body. It is used by
the runtime to correctly parse the incoming WMQ message body
data when reading, and to ensure that the WMQ header format
is correctly populated when going outbound.
format
- The WMQ body format.java.lang.String getFormat()
setFormat
method below.
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |