com.ibm.websphere.sca.jms.data.impl

Class JMSDataBindingImplJava

  1. java.lang.Object
  2. extended bycom.ibm.ws.sca.databinding.impl.DataBindingImplJava
  3. extended bycom.ibm.websphere.sca.jms.data.impl.JMSDataBindingImplJava
All implemented interfaces:
JMSDataBinding, JMSObjectBinding, commonj.connector.runtime.DataBinding, java.io.Serializable

  1. public class JMSDataBindingImplJava
  2. extends com.ibm.ws.sca.databinding.impl.DataBindingImplJava
  3. implements JMSObjectBinding
A JMS Data Binding implementation that serializes data object into JMS Object Message using Java serialization mechanism.
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
$sccsid
  1. static
  2. java.lang.String
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
  1. boolean
equals(java.lang.Object obj)
For now it suffices to check that the two bindings are of the same type.
  1. commonj.sdo.DataObject
getDataObject()
  1. int
getMessageType()
Returns OBJECT_MESSAGE which is the only message type supported by JMSDataBindingImplJava.
  1. java.lang.Object
getObject()
  1. java.io.Serializable
getSerializableObject()
Deprecated. getObject() is used instead
  1. int
hashCode()
Any instance of JMSDataBindingImplJava equals each other, so a constant value 37 is returned as hashCode
  1. boolean
isBusinessException()
  1. boolean
isObjectType()
  1. boolean
isPrimitiveType()
Deprecated. isObjectType() is used instead
  1. void
read(javax.jms.Message message)
Read message.
  1. void
setBusinessException(boolean isBusinessException)
  1. void
setObject(java.lang.Object data)
Sets the Object and changes objectType to true.
  1. void
setObjectType(boolean isObject)
  1. void
setPrimitiveType(boolean isPrimitiveType)
Deprecated. setObjectType(boolean) is used instead
  1. void
setSerializableObject(java.io.Serializable data)
Deprecated. setObject(Object) is used instead
  1. void
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

  1. public static final java.lang.String COPYRIGHT
See Also:

$sccsid

  1. public static final java.lang.String $sccsid
See Also:

Constructor Detail

JMSDataBindingImplJava

  1. public JMSDataBindingImplJava()

Method Detail

isBusinessException

  1. public boolean isBusinessException( )
Description copied from interface: JMSDataBinding
Queries the DataBinding to determine whether the received message contains a fault (carried within a BusinessException).
Specified by:
Returns:
A boolean value stating whether the message payload is a fault.

setBusinessException

  1. 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:
Parameters:
isBusinessException - True or false, specified by the caller.

getDataObject

  1. 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

  1. public void setObject(java.lang.Object data)
Sets the Object and changes objectType to true.
Specified by:
Parameters:
data - must implement Serializable
Throws:
ServiceRuntimeException - is thrown if data can't be serialized

getObject

  1. 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:
Returns:
The generated Object.

isObjectType

  1. 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:
Returns:
A boolean specifying either Object or DataObject (false implies DataObject).

setObjectType

  1. 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:
Parameters:
isObject - A boolean value indicating whether the payload is an Object or a DataObject.

isPrimitiveType

  1. public boolean isPrimitiveType( )
Deprecated. isObjectType() is used instead

setPrimitiveType

  1. public void setPrimitiveType(boolean isPrimitiveType)
Deprecated. setObjectType(boolean) is used instead
Parameters:
isPrimitiveType -

setSerializableObject

  1. public void setSerializableObject( java.io.Serializable data)
Deprecated. setObject(Object) is used instead
Parameters:
data -

getSerializableObject

  1. public java.io.Serializable getSerializableObject( )
Deprecated. getObject() is used instead

getMessageType

  1. public int getMessageType()
Returns OBJECT_MESSAGE which is the only message type supported by JMSDataBindingImplJava.
Specified by:
Returns:
Message type, represented by one of the static integer definitions above.
See Also:

read

  1. public void read(javax.jms.Message message)
  2. 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

  1. public void write(javax.jms.Message message)
  2. 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

  1. 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

  1. 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()