com.softwareag.jca
Class RPCMessage

java.lang.Object
  extended by com.softwareag.jca.PMQMessage
      extended by com.softwareag.jca.RPCMessage

public class RPCMessage
extends PMQMessage

An instance of this class is a synchronous message object for send and receive. The message is dispatched from RPCMessageDispatcher.

Version:
$Revision: 1.1 $

Constructor Summary
protected RPCMessage(byte[] input)
          Creates message object.
 
Method Summary
 void ejbInvoke(java.lang.Object ejb)
          Dispatches the incoming document to EJBInvoker.
 java.util.Properties getProperties()
           
 org.w3c.dom.Document getRequestDocument()
           
protected  byte[] getResponseBytes()
           
protected  void setProperties(java.util.Properties properties)
          Set RPC message properties.
 void setResponse(org.w3c.dom.Document output, java.lang.String encoding)
          Set and reply the response XML document.
 
Methods inherited from class com.softwareag.jca.PMQMessage
getRequestStream, getRequestString, getResponseStream, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPCMessage

protected RPCMessage(byte[] input)
Creates message object.

Parameters:
input - message stream
Method Detail

getResponseBytes

protected byte[] getResponseBytes()

setProperties

protected void setProperties(java.util.Properties properties)
Set RPC message properties.

Parameters:
properties -

getRequestDocument

public org.w3c.dom.Document getRequestDocument()
                                        throws java.io.IOException,
                                               javax.xml.parsers.ParserConfigurationException,
                                               org.xml.sax.SAXException
Overrides:
getRequestDocument in class PMQMessage
Returns:
the received document as DOM tree.
Throws:
java.io.IOException - on delivery problems
javax.xml.parsers.ParserConfigurationException - no DOM implementation is available
org.xml.sax.SAXException - message doesn't contain XML

setResponse

public void setResponse(org.w3c.dom.Document output,
                        java.lang.String encoding)
                 throws java.io.IOException
Set and reply the response XML document.

Overrides:
setResponse in class PMQMessage
Parameters:
output - document
Throws:
java.io.IOException

getProperties

public java.util.Properties getProperties()
Returns:
message properties

ejbInvoke

public void ejbInvoke(java.lang.Object ejb)
               throws java.lang.Throwable
Dispatches the incoming document to EJBInvoker. This invoker calls the EJB method discribed by XML mapping document. The response of invoker are set as RPC response.

Parameters:
ejb -
Throws:
java.lang.Throwable - any problem exception


Copyright © 2004-2008 Software AG. All Rights Reserved.