com.ibm.websphere.sca.jms.data.impl
Class JMSDataBindingImplJava
- java.lang.Object
com.ibm.ws.sca.databinding.impl.DataBindingImplJava
com.ibm.websphere.sca.jms.data.impl.JMSDataBindingImplJava
All implemented interfaces:
JMSDataBinding, JMSObjectBinding, commonj.connector.runtime.DataBinding, java.io.Serializable
- public class JMSDataBindingImplJava
- extends com.ibm.ws.sca.databinding.impl.DataBindingImplJava
- implements JMSObjectBinding
See Also:
Field Summary
Modifier and Type | Field and Description |
---|---|
|
$sccsid
|
|
COPYRIGHT
|
Fields inherited from class com.ibm.ws.sca.databinding.impl.DataBindingImplJava |
---|
fieldDataObject |
Fields inherited from interface com.ibm.websphere.sca.jms.data.JMSDataBinding |
---|
ANY_MESSAGE, BASE_MESSAGE, BYTES_MESSAGE, MAP_MESSAGE, OBJECT_MESSAGE, STREAM_MESSAGE, TEXT_MESSAGE |
Constructor Summary
Constructor and Description |
---|
JMSDataBindingImplJava()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
equals(java.lang.Object obj)
For now it suffices to check that the two bindings are of the same type.
|
|
getDataObject()
|
|
getMessageType()
Returns
OBJECT_MESSAGE which is the only message type
supported by JMSDataBindingImplJava.
|
|
getObject()
|
|
getSerializableObject()
Deprecated.
getObject() is used instead
|
|
hashCode()
Any instance of JMSDataBindingImplJava equals each other, so a constant value
37
is returned as hashCode
|
|
isBusinessException()
|
|
isObjectType()
|
|
isPrimitiveType()
Deprecated.
isObjectType() is used instead
|
|
read(javax.jms.Message message)
Read message.
|
|
setBusinessException(boolean isBusinessException)
|
|
setObject(java.lang.Object data)
Sets the Object and changes objectType to true.
|
|
setObjectType(boolean isObject)
|
|
setPrimitiveType(boolean isPrimitiveType)
Deprecated.
setObjectType(boolean) is used instead
|
|
setSerializableObject(java.io.Serializable data)
Deprecated.
setObject(Object) is used instead
|
|
write(javax.jms.Message message)
|
Methods inherited from class com.ibm.ws.sca.databinding.impl.DataBindingImplJava |
---|
getAsByteArray, setDataObject, setFromByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface commonj.connector.runtime.DataBinding |
---|
setDataObject |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
$sccsid
- public static final java.lang.String $sccsid
See Also:
Constructor Detail
JMSDataBindingImplJava
- public JMSDataBindingImplJava()
Method Detail
isBusinessException
- public boolean isBusinessException( )
Queries the DataBinding to determine whether the received
message contains a fault (carried within a
BusinessException).
Specified by:
isBusinessException
in interface JMSDataBinding
Returns:
A boolean value stating whether the message payload
is a fault.
setBusinessException
- public void setBusinessException( boolean isBusinessException)
Description copied from interface:
JMSDataBinding
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.
Specified by:
setBusinessException
in interface JMSDataBinding
Parameters:
isBusinessException
- True or false, specified by the
caller. getDataObject
- public commonj.sdo.DataObject getDataObject( )
Specified by:
getDataObject
in interface commonj.connector.runtime.DataBinding
Overrides:
getDataObject
in class com.ibm.ws.sca.databinding.impl.DataBindingImplJava
See Also:
DataBinding.getDataObject()
setObject
- public void setObject(java.lang.Object data)
Sets the Object and changes objectType to true.
Specified by:
setObject
in interface JMSObjectBinding
Parameters:
data
- must implement Serializable Throws:
ServiceRuntimeException
- is thrown if data can't be serialized getObject
- public java.lang.Object getObject( )
Description copied from interface:
JMSObjectBinding
Returns the Object created by this DataBinding implementation
(in the
read
method) to the runtime.
Specified by:
getObject
in interface JMSObjectBinding
Returns:
The generated Object.
isObjectType
- public boolean isObjectType()
Description copied from interface:
JMSObjectBinding
Used by the runtime to query whether the payload received by
the DataBinding is an Object or a DataObject. The runtime
will then call
getObject
or
getDataObject
as appropriate.
Specified by:
isObjectType
in interface JMSObjectBinding
Returns:
A boolean specifying either Object or DataObject
(false implies DataObject).
setObjectType
- public void setObjectType(boolean isObject)
Description copied from interface:
JMSObjectBinding
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
). The
DataBinding will then serialize the Object to the outgoing
JMS Message.
Specified by:
setObjectType
in interface JMSObjectBinding
Parameters:
isObject
- A boolean value indicating whether the
payload is an Object or a DataObject. isPrimitiveType
- public boolean isPrimitiveType( )
Deprecated.
isObjectType()
is used instead
setPrimitiveType
- public void setPrimitiveType(boolean isPrimitiveType)
Deprecated.
setObjectType(boolean)
is used instead
Parameters:
isPrimitiveType
- setSerializableObject
- public void setSerializableObject( java.io.Serializable data)
Deprecated.
setObject(Object)
is used instead
Parameters:
data
- getSerializableObject
- public java.io.Serializable getSerializableObject( )
Deprecated.
getObject()
is used instead
getMessageType
- public int getMessageType()
Returns
OBJECT_MESSAGE
which is the only message type
supported by JMSDataBindingImplJava.
Specified by:
getMessageType
in interface JMSDataBinding
Returns:
Message type, represented by one of the static
integer definitions above.
See Also:
read
- public void read(javax.jms.Message message)
- throws javax.jms.JMSException
Read message.
Do NOT parse but store native message for later lazy parsing.
Specified by:
read
in interface JMSDataBinding
Parameters:
message
- The message whose payload is to be parsed. Throws:
javax.jms.JMSException
- Thrown if an error occurs
during reading of the message. See Also:
write
- public void write(javax.jms.Message message)
- throws javax.jms.JMSException
Description copied from interface:
JMSDataBinding
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.
Specified by:
write
in interface JMSDataBinding
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. See Also:
equals
- public boolean equals(java.lang.Object obj)
For now it suffices to check that the two bindings are of the same type.
Any instance(not children type) of JMSDataBindingImplJava equals each other.
Overrides:
equals
in class java.lang.Object
See Also:
Object.equals(java.lang.Object)
hashCode
- public int hashCode()
Any instance of JMSDataBindingImplJava equals each other, so a constant value
37
is returned as hashCode
Overrides:
hashCode
in class java.lang.Object
See Also:
Object.hashCode()
JMSDataBinding