org.apache.soap.transport.smtp
Class SOAPSMTPConnection
java.lang.Object
|
+--org.apache.soap.transport.smtp.SOAPSMTPConnection
- public class SOAPSMTPConnection
- extends java.lang.Object
- implements SOAPTransport
SOAPSMTPConnection
is an implementation of the
SOAPTransport
interface for SMTP.
- Author:
- Sanjiva Weerawarana (sanjiva@watson.ibm.com)
Constructor Summary |
SOAPSMTPConnection(java.lang.String fromAddr,
java.lang.String subject,
java.lang.String smtpServer,
long popPollDelay,
java.lang.String popServer,
java.lang.String popLogin,
java.lang.String popPassword)
Constructor: sets up this SMTP connection for sending and
receiving a SOAP envelope via SMTP and POP3, respectively. |
Method Summary |
java.util.Hashtable |
getHeaders()
Return access to headers generated by the protocol. |
SOAPContext |
getResponseSOAPContext()
Return the SOAPContext associated with the response. |
java.io.BufferedReader |
receive()
Return a buffered reader to receive back the response to whatever
was sent to whatever. |
void |
send(java.net.URL toAddr,
java.lang.String actionURI,
java.util.Hashtable headers,
Envelope env,
SOAPMappingRegistry smr,
SOAPContext ctx)
This method is used to request that an envelope be sent. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SOAPSMTPConnection
public SOAPSMTPConnection(java.lang.String fromAddr,
java.lang.String subject,
java.lang.String smtpServer,
long popPollDelay,
java.lang.String popServer,
java.lang.String popLogin,
java.lang.String popPassword)
- Constructor: sets up this SMTP connection for sending and
receiving a SOAP envelope via SMTP and POP3, respectively.
- Parameters:
fromAddr
- the sender's addresssubject
- subject of the email messagesmtpServer
- the SMTP server to use to sendpopPollDelay
- the number of millis to sleep between response pollspopServer
- hostname of POP3 server to receive frompopLogin
- login ID to receive mail atpopPassword
- password for login
send
public void send(java.net.URL toAddr,
java.lang.String actionURI,
java.util.Hashtable headers,
Envelope env,
SOAPMappingRegistry smr,
SOAPContext ctx)
throws SOAPException
- This method is used to request that an envelope be sent.
Note: sending SOAPContext not implemented yet.
- Specified by:
- send in interface SOAPTransport
- Parameters:
sendTo
- the URL to send the envelope to ("mailto:xxx@yyy")action
- the SOAPAction header field valueheaders
- any other header fields to go to as protocol headers
[IGNORED right now]env
- the envelope to sendsmr
- the XML<->Java type mapping registry (passed on)ctx
- the request SOAPContext- Throws:
- SOAPException - with appropriate reason code if problem
receive
public java.io.BufferedReader receive()
- Return a buffered reader to receive back the response to whatever
was sent to whatever. This does a blocking wait until a response
is received .. don't do it lightly. Should take into account
timeouts and such in the future.
- Specified by:
- receive in interface SOAPTransport
- Returns:
- a reader to read the results from or null if that's not
possible.
getHeaders
public java.util.Hashtable getHeaders()
- Return access to headers generated by the protocol.
- Specified by:
- getHeaders in interface SOAPTransport
- Returns:
- a hashtable containing all the headers
getResponseSOAPContext
public SOAPContext getResponseSOAPContext()
- Return the SOAPContext associated with the response.
Not implemented yet!
- Specified by:
- getResponseSOAPContext in interface SOAPTransport
- Returns:
- response SOAPContext
Copyright © 2001 Apache XML Project. All Rights Reserved.