org.jboss.soa.esb.addressing
Class EPR

java.lang.Object
  extended by org.jboss.soa.esb.addressing.EPR
Direct Known Subclasses:
EmailEpr, FileEpr, HibernateEpr, HTTPEpr, InVMEpr, JDBCEpr, JMSEpr, LogicalEPR

public class EPR
extends java.lang.Object

The Endpoint Reference class. All services (and clients) can be represented by an EPR, which is effectively an address. If using SOA principles then the ultimate recipient of the message should be addressed in a loosely-coupled manner: the service should multiplex/demultiplex work across "objects" based on the message content and the EPR should not address a specific "object".

Author:
marklittle

Field Summary
protected static org.apache.log4j.Logger _logger
           
static java.lang.String EPR_TYPE
           
 
Constructor Summary
  EPR()
          Create a new Endpoint Reference with a null address.
  EPR(EPR from)
          Copy constructor.
  EPR(PortReference addr)
          Create a new Endpoint Reference with the specified address.
protected EPR(java.lang.String type)
          Create a new Endpoint Reference with a null address.
  EPR(java.net.URI uri)
          Create a new Endpoint Reference with the specified address.
protected EPR(java.net.URI uri, java.lang.String type)
          Create a new Endpoint Reference with the specified address.
 
Method Summary
 EPR copy()
          Return a copy of this EPR.
 boolean equals(java.lang.Object obj)
           
 PortReference getAddr()
          Get the EPR address.
 java.net.URI getURI()
          Get the URI address.
 int hashCode()
          Return a hash code for this element.
 void setAddr(PortReference uri)
          Override the address of this EPR.
protected  void setType(java.lang.String type)
          Set the EPR type.
 void setURI(java.net.URI uri)
          Set the URI for this endpoint.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_logger

protected static final org.apache.log4j.Logger _logger

EPR_TYPE

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

EPR

public EPR()
Create a new Endpoint Reference with a null address.


EPR

protected EPR(java.lang.String type)
Create a new Endpoint Reference with a null address.


EPR

public EPR(PortReference addr)
Create a new Endpoint Reference with the specified address.

Parameters:
addr - the specified address.

EPR

public EPR(java.net.URI uri)
Create a new Endpoint Reference with the specified address.

Parameters:
uri - the specified address.

EPR

protected EPR(java.net.URI uri,
              java.lang.String type)
Create a new Endpoint Reference with the specified address.

Parameters:
uri - the specified address.
type - The EPR type

EPR

public EPR(EPR from)
Copy constructor.

Parameters:
from -
Method Detail

setAddr

public void setAddr(PortReference uri)
Override the address of this EPR.

Parameters:
uri - the new address.

setURI

public void setURI(java.net.URI uri)
Set the URI for this endpoint.

Parameters:
uri - the address.

getURI

public java.net.URI getURI()
                    throws java.net.URISyntaxException
Get the URI address.

Returns:
the address.
Throws:
java.net.URISyntaxException - thrown if the address is invalid.

getAddr

public PortReference getAddr()
Get the EPR address.

Returns:
the address.

setType

protected void setType(java.lang.String type)
Set the EPR type.

Parameters:
type -

copy

public EPR copy()
Return a copy of this EPR.


toString

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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return a hash code for this element.

Overrides:
hashCode in class java.lang.Object
Returns:
the element hash code.