com.softwareag.jca
Class PMQMessage

java.lang.Object
  extended by com.softwareag.jca.PMQMessage
Direct Known Subclasses:
RPCMessage

public class PMQMessage
extends java.lang.Object

This object is a message which is received and dispatched from PMQMessageServer and PMQMessageStreamDispatcher.

Version:
$Revision: 1.2 $

Constructor Summary
protected PMQMessage(java.io.InputStream input, java.io.OutputStream output)
          Creates message object.
 
Method Summary
 org.w3c.dom.Document getRequestDocument()
           
 java.io.InputStream getRequestStream()
           
 java.lang.String getRequestString()
           
 java.io.OutputStream getResponseStream()
           
 void setResponse(org.w3c.dom.Document output, java.lang.String encoding)
          Set and reply the response XML document.
 void setResponse(java.lang.String output, java.lang.String encoding)
          Set and reply the string response document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMQMessage

protected PMQMessage(java.io.InputStream input,
                     java.io.OutputStream output)
Creates message object.

Parameters:
input - stream
output - response stream
Method Detail

getRequestStream

public java.io.InputStream getRequestStream()
Returns:
the received message as stream

getResponseStream

public java.io.OutputStream getResponseStream()
Returns:
optional stream object to reply the input getRequestStream().

getRequestString

public java.lang.String getRequestString()
                                  throws java.io.IOException
Returns:
the received message as string
Throws:
java.io.IOException - on delivery problems

getRequestDocument

public org.w3c.dom.Document getRequestDocument()
                                        throws java.io.IOException,
                                               javax.xml.parsers.ParserConfigurationException,
                                               org.xml.sax.SAXException
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.

Parameters:
output - document
Throws:
java.io.IOException

setResponse

public void setResponse(java.lang.String output,
                        java.lang.String encoding)
                 throws java.io.IOException
Set and reply the string response document.

Parameters:
output - string
encoding - set the character set for encoded output stream.
Throws:
java.io.IOException


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