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

Class JMSDataBindingImplXML

  1. java.lang.Object
  2. extended bycom.ibm.ws.sca.databinding.impl.DataBindingImplXML
  3. extended bycom.ibm.websphere.sca.jms.data.impl.JMSDataBindingImplXML
All implemented interfaces:
JMSDataBinding, JMSDataBindingXML, com.ibm.wsspi.sca.jms.data.JMSDataBindingNativeBytes, commonj.connector.runtime.BindingContext, commonj.connector.runtime.DataBinding, java.io.Serializable

  1. public class JMSDataBindingImplXML
  2. extends com.ibm.ws.sca.databinding.impl.DataBindingImplXML
  3. implements JMSDataBinding, commonj.connector.runtime.BindingContext, JMSDataBindingXML, com.ibm.wsspi.sca.jms.data.JMSDataBindingNativeBytes
JMS Data Binding that converts between SDO and its String XML representation.
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.DataBindingImplXML
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
Fields inherited from interface commonj.connector.runtime.BindingContext
BINDING_COMMUNICATION, BINDING_COMMUNICATION_INBOUND, BINDING_COMMUNICATION_OUTBOUND, BINDING_CONFIGURATION, BINDING_INVOCATION, BINDING_INVOCATION_FAULT, BINDING_INVOCATION_REQUEST, BINDING_INVOCATION_RESPONSE, BINDING_NAME, BINDING_REGISTRY, BINDING_TYPE, BINDING_TYPE_EIS, BINDING_TYPE_HTTP, BINDING_TYPE_JMS, EXPECTED_TYPE, INTERACTION_SPEC

Constructor Summary

Constructor and Description
JMSDataBindingImplXML()

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
Check if two JMSDataBindingImplXML's are equal.
  1. commonj.sdo.DataObject
getDataObject()
  1. int
getMessageType()
Return the Text Message type
  1. int
hashCode()
Any instance of JMSDataBindingImplXML equals each other, so a constant value 31 is returned as hashCode
  1. boolean
isBusinessException()
  1. boolean
outputWrappedXML()
  1. void
read(byte[] nativeBytes,boolean isBusinessException)
  1. void
read(javax.jms.Message message)
  1. void
setBindingContext(java.util.Map bindingContext)
This method is used to set a BindingContext map into the data binding.
  1. void
setBusinessException(boolean isBusinessException)
  1. void
write(javax.jms.Message message)
Methods inherited from class com.ibm.ws.sca.databinding.impl.DataBindingImplXML
getAsByteArray, getAsString, read, setDataObject, setEncoding, setFromByteArray, setFromString, write
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

JMSDataBindingImplXML

  1. public JMSDataBindingImplXML()

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.

getMessageType

  1. public int getMessageType()
Return the Text Message type
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
Description copied from interface: JMSDataBinding
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");

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:

read

  1. public void read(byte[] nativeBytes,
  2. boolean isBusinessException)
Specified by:
read in interface com.ibm.wsspi.sca.jms.data.JMSDataBindingNativeBytes

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:

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.DataBindingImplXML
See Also:
com.ibm.websphere.eis.DataBinding#getDataObject()

setBindingContext

  1. public void setBindingContext(java.util.Map bindingContext)
This method is used to set a BindingContext map into the data binding.
Specified by:
setBindingContext in interface commonj.connector.runtime.BindingContext

outputWrappedXML

  1. public boolean outputWrappedXML( )
Description copied from interface: JMSDataBindingXML
Used by the runtime to determine whether a doc-lit wrapped input type should be unwrapped before passing it to the data binding, and whether to doc-lit wrap the output type.
Specified by:
Returns:
A boolean specifying either wrapped XML or unwrapped XML (false implies unwrapped)

equals

  1. public boolean equals(java.lang.Object obj)
Check if two JMSDataBindingImplXML's are equal.
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

  1. public int hashCode()
Any instance of JMSDataBindingImplXML equals each other, so a constant value 31 is returned as hashCode
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()