public class JMSDataBindingImplJava extends com.ibm.ws.sca.databinding.impl.DataBindingImplJava implements JMSObjectBinding
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
$sccsid |
static java.lang.String |
COPYRIGHT |
ANY_MESSAGE, BASE_MESSAGE, BYTES_MESSAGE, MAP_MESSAGE, OBJECT_MESSAGE, STREAM_MESSAGE, TEXT_MESSAGE
Constructor and Description |
---|
JMSDataBindingImplJava() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
For now it suffices to check that the two bindings are of the same type.
|
commonj.sdo.DataObject |
getDataObject() |
int |
getMessageType()
Returns
OBJECT_MESSAGE which is the only message type
supported by JMSDataBindingImplJava. |
java.lang.Object |
getObject()
Returns the Object created by this DataBinding implementation
(in the
read method) to the runtime. |
java.io.Serializable |
getSerializableObject()
Deprecated.
getObject() is used instead |
int |
hashCode()
Any instance of JMSDataBindingImplJava equals each other, so a constant value
37
is returned as hashCode |
boolean |
isBusinessException()
Queries the DataBinding to determine whether the received
message contains a fault (carried within a
BusinessException).
|
boolean |
isObjectType()
Used by the runtime to query whether the payload received by
the DataBinding is an Object or a DataObject.
|
boolean |
isPrimitiveType()
Deprecated.
isObjectType() is used instead |
void |
read(javax.jms.Message message)
Read message.
|
void |
setBusinessException(boolean isBusinessException)
This method is called by the runtime if the outgoing message
contains a BusinessException.
|
void |
setObject(java.lang.Object data)
Sets the Object and changes objectType to true.
|
void |
setObjectType(boolean isObject)
Used by the runtime to indicate to the DataBinding that the
input value to be serialized by the
write
method is an Object (set by setObject ) and not a
DataObject (set by setDataObject ). |
void |
setPrimitiveType(boolean isPrimitiveType)
Deprecated.
setObjectType(boolean) is used instead |
void |
setSerializableObject(java.io.Serializable data)
Deprecated.
setObject(Object) is used instead |
void |
write(javax.jms.Message message)
Write the DataObject into an outgoing JMS Message.
|
getAsByteArray, setDataObject, setFromByteArray
public static final java.lang.String COPYRIGHT
public static final java.lang.String $sccsid
public boolean isBusinessException()
JMSDataBinding
isBusinessException
in interface JMSDataBinding
public void setBusinessException(boolean isBusinessException)
JMSDataBinding
setBusinessException
in interface JMSDataBinding
isBusinessException
- True or false, specified by the
caller.public commonj.sdo.DataObject getDataObject()
getDataObject
in interface commonj.connector.runtime.DataBinding
getDataObject
in class com.ibm.ws.sca.databinding.impl.DataBindingImplJava
DataBinding.getDataObject()
public void setObject(java.lang.Object data)
setObject
in interface JMSObjectBinding
data
- must implement SerializableServiceRuntimeException
- is thrown if data can't be serializedpublic java.lang.Object getObject()
JMSObjectBinding
read
method) to the runtime.getObject
in interface JMSObjectBinding
public boolean isObjectType()
JMSObjectBinding
getObject
or
getDataObject
as appropriate.isObjectType
in interface JMSObjectBinding
public void setObjectType(boolean isObject)
JMSObjectBinding
write
method is an Object (set by setObject
) and not a
DataObject (set by setDataObject
). The
DataBinding will then serialize the Object to the outgoing
JMS Message.setObjectType
in interface JMSObjectBinding
isObject
- A boolean value indicating whether the
payload is an Object or a DataObject.public boolean isPrimitiveType()
isObjectType()
is used insteadpublic void setPrimitiveType(boolean isPrimitiveType)
setObjectType(boolean)
is used insteadisPrimitiveType
- public void setSerializableObject(java.io.Serializable data)
setObject(Object)
is used insteaddata
- public java.io.Serializable getSerializableObject()
getObject()
is used insteadpublic int getMessageType()
OBJECT_MESSAGE
which is the only message type
supported by JMSDataBindingImplJava.getMessageType
in interface JMSDataBinding
JMSDataBinding.getMessageType()
public void read(javax.jms.Message message) throws javax.jms.JMSException
read
in interface JMSDataBinding
message
- The message whose payload is to be parsed.javax.jms.JMSException
- Thrown if an error occurs
during reading of the message.JMSDataBinding.read(javax.jms.Message)
public void write(javax.jms.Message message) throws javax.jms.JMSException
JMSDataBinding
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.
write
in interface JMSDataBinding
message
- The message to be populated with the
serialized DataObject.javax.jms.JMSException
- Thrown if an error occurs
during writing of the message.JMSDataBinding.write(javax.jms.Message)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
37
is returned as hashCodehashCode
in class java.lang.Object
Object.hashCode()