org.jboss.soa.esb.addressing.eprs
Class EmailEpr

java.lang.Object
  extended by org.jboss.soa.esb.addressing.EPR
      extended by org.jboss.soa.esb.addressing.eprs.EmailEpr

public class EmailEpr
extends EPR

A helper class for using email style EPRs. Simply create and use instances of this type.

Author:
marklittle

Field Summary
static java.lang.String DEFAULT_PASSWORD
           
static java.lang.String DEFAULT_PORT
           
static java.lang.String DEFAULT_USERNAME
           
static java.lang.String PASSWORD_TAG
           
static java.lang.String POP_PROTOCOL
           
static java.lang.String SMTP_PROTOCOL
           
static java.lang.String USERNAME_TAG
           
 
Constructor Summary
EmailEpr(EPR epr)
           
EmailEpr(EPR epr, org.w3c.dom.Element header)
           
EmailEpr(java.lang.String protocol, java.lang.String host)
          Create a new email EPR.
EmailEpr(java.lang.String protocol, java.lang.String host, java.lang.String port, java.lang.String username, java.lang.String password)
          Create a new email EPR.
 
Method Summary
 EPR copy()
          Return a copy of this EPR.
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 int getPort()
           
 java.lang.String getProtocol()
           
 java.lang.String getUserName()
           
 java.lang.String toString()
           
static java.net.URI type()
           
 
Methods inherited from class org.jboss.soa.esb.addressing.EPR
equals, getAddr, getURI, setAddr, setURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
See Also:
Constant Field Values

DEFAULT_USERNAME

public static final java.lang.String DEFAULT_USERNAME
See Also:
Constant Field Values

DEFAULT_PASSWORD

public static final java.lang.String DEFAULT_PASSWORD
See Also:
Constant Field Values

SMTP_PROTOCOL

public static final java.lang.String SMTP_PROTOCOL
See Also:
Constant Field Values

POP_PROTOCOL

public static final java.lang.String POP_PROTOCOL
See Also:
Constant Field Values

USERNAME_TAG

public static final java.lang.String USERNAME_TAG
See Also:
Constant Field Values

PASSWORD_TAG

public static final java.lang.String PASSWORD_TAG
See Also:
Constant Field Values
Constructor Detail

EmailEpr

public EmailEpr(EPR epr)

EmailEpr

public EmailEpr(EPR epr,
                org.w3c.dom.Element header)

EmailEpr

public EmailEpr(java.lang.String protocol,
                java.lang.String host)
Create a new email EPR. The port number will be assumed to be 25, and there are no values for username and password.

Parameters:
protocol - the protocol to use.
host - the host name.

EmailEpr

public EmailEpr(java.lang.String protocol,
                java.lang.String host,
                java.lang.String port,
                java.lang.String username,
                java.lang.String password)
Create a new email EPR.

Parameters:
protocol - the protocol to use.
host - the host name.
port - the port to use.
username - the username for sending/receiving.
password - the password for sending/receiving.
Method Detail

getProtocol

public final java.lang.String getProtocol()
                                   throws java.net.URISyntaxException
Returns:
the email protocol used.
Throws:
java.net.URISyntaxException - thrown if the address is malformed.

getHost

public final java.lang.String getHost()
                               throws java.net.URISyntaxException
Returns:
the email host used.
Throws:
java.net.URISyntaxException - thrown if the address is malformed.

getPort

public final int getPort()
                  throws java.net.URISyntaxException
Returns:
the email port used, or -1 if not specified.
Throws:
java.net.URISyntaxException - thrown if the address is malformed.

getPassword

public final java.lang.String getPassword()
                                   throws java.net.URISyntaxException
Returns:
the password for this EPR, or null if none is set.
Throws:
java.net.URISyntaxException - thrown if the address is malformed.

getUserName

public final java.lang.String getUserName()
                                   throws java.net.URISyntaxException
Returns:
the username for this EPR, or null if none is set.
Throws:
java.net.URISyntaxException - thrown if the address is malformed.

toString

public java.lang.String toString()
Overrides:
toString in class EPR

copy

public EPR copy()
Description copied from class: EPR
Return a copy of this EPR.

Overrides:
copy in class EPR

type

public static final java.net.URI type()