com.softwareag.sagd.PMQServer
Class ToHTTPStreamDispatcher

java.lang.Object
  extended by com.softwareag.sagd.PMQServer.PMQInterfaceDispatcher
      extended by com.softwareag.sagd.PMQServer.ToHTTPStreamDispatcher

public class ToHTTPStreamDispatcher
extends PMQInterfaceDispatcher

This dispatcher class implements the stream interface. Incoming streams are sending with HTTP post or put to a web application.

Version:
$Revision: 1.1 $

Constructor Summary
ToHTTPStreamDispatcher(java.lang.String url, boolean doPost)
          Creates object and sends all messages to given URL.
 
Method Summary
 boolean doDispatch(java.io.InputStream receivedMessage, java.io.OutputStream replyMessage)
          Receives messages as stream and replies response.
 void doIgnoreReplyMessage(boolean flag)
           
 void doInit()
          Initialize object.
 void doRelease()
          Release all resources.
 void setAuthentication(java.lang.String userID, java.lang.String password)
          Connect with basic authentication
 
Methods inherited from class com.softwareag.sagd.PMQServer.PMQInterfaceDispatcher
doDispatch, doInit, doLog, doLog, getLifetime, getPersistentStatusFlagChanged, getStatusPersistence, isSingleMessageDispatcher, isStreamSendResponseDispatcher, setLifetime, setSingleMessageDispatcher, setStatusPersistence, setStreamSendResponseDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToHTTPStreamDispatcher

public ToHTTPStreamDispatcher(java.lang.String url,
                              boolean doPost)
Creates object and sends all messages to given URL.

Parameters:
url - of web application
doPost - true uses POST and false uses PUT method
Method Detail

setAuthentication

public void setAuthentication(java.lang.String userID,
                              java.lang.String password)
Connect with basic authentication

Parameters:
userID -
password -

doIgnoreReplyMessage

public void doIgnoreReplyMessage(boolean flag)

doInit

public void doInit()
            throws java.lang.Throwable
Initialize object.

Overrides:
doInit in class PMQInterfaceDispatcher
Throws:
java.lang.Throwable

doDispatch

public boolean doDispatch(java.io.InputStream receivedMessage,
                          java.io.OutputStream replyMessage)
Receives messages as stream and replies response.

Overrides:
doDispatch in class PMQInterfaceDispatcher
Parameters:
receivedMessage - Incoming message
replyMessage - Outgoing message
Returns:
true to commit the message. false does a backout and stops the server.

doRelease

public void doRelease()
Release all resources.

Overrides:
doRelease in class PMQInterfaceDispatcher


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