org.apache.soap.server
Class SMTP2HTTPBridge
java.lang.Object
org.apache.soap.server.SMTP2HTTPBridge
- All Implemented Interfaces:
- java.lang.Runnable
- public class SMTP2HTTPBridge
- extends java.lang.Object
- implements java.lang.Runnable
This class can be used as a bridge to relay SOAP messages received via
email to an HTTP SOAP listener. This is basically a polling POP3 client
that keeps looking for new messages to work on. When it gets one,
it forwards it to a SOAP HTTP listener and forwards the response via
SMTP to the original requestor (to either the ReplyTo: or From: address).
- Author:
- Sanjiva Weerawarana (sanjiva@watson.ibm.com)
Constructor Summary |
SMTP2HTTPBridge(long pollDelayMillis,
java.lang.String popServer,
java.lang.String popLoginName,
java.lang.String password,
java.net.URL httpURL,
java.lang.String smtpServer)
Constructor: creates a bridge. |
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
run()
Poll for messages forever. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMTP2HTTPBridge
public SMTP2HTTPBridge(long pollDelayMillis,
java.lang.String popServer,
java.lang.String popLoginName,
java.lang.String password,
java.net.URL httpURL,
java.lang.String smtpServer)
- Constructor: creates a bridge. Call run() to start polling using
the current thread. (If you want to use a separate thread then
do new Thread (new SMT2HTTPBridge (...)).start ();
- Parameters:
pollDelayMillis
- number of milli-seconds to sleep b'ween pollspopServer
- hostname of POP3 serverpopLoginName
- login IDpassword
- password for loginsmtpServer
- hostname of SMTP server
run
public void run()
- Poll for messages forever.
- Specified by:
run
in interface java.lang.Runnable
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright ? 2001 Apache XML Project. All Rights Reserved.