org.mule.endpoint
Class MuleEndpointURI

java.lang.Object
  extended by org.mule.endpoint.MuleEndpointURI
All Implemented Interfaces:
java.io.Serializable, EndpointURI, Initialisable

public class MuleEndpointURI
extends java.lang.Object
implements EndpointURI

MuleEndpointURI is used to determine how a message is sent or received. The url defines the protocol, the endpointUri destination of the message and optionally the endpoint to use when dispatching the event. Mule urls take the form of - protocol://[host]:[port]/[provider]/endpointUri or protocol://[host]:[port]/endpointUri i.e. vm:///my.object
The protocol can be any of any connector registered with Mule. The endpoint name if specified must be the name of a registered global endpoint. The endpointUri can be any endpointUri recognised by the endpoint type.

See Also:
Serialized Form

Field Summary
protected static Log logger
          logger used by this class
 
Fields inherited from interface org.mule.api.endpoint.EndpointURI
PROPERTY_CONNECTOR_NAME, PROPERTY_ENDPOINT_NAME, PROPERTY_ENDPOINT_URI, PROPERTY_RESPONSE_TRANSFORMERS, PROPERTY_TRANSFORMERS
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
MuleEndpointURI(EndpointURI endpointUri)
           
MuleEndpointURI(EndpointURI endpointUri, java.lang.String filterAddress)
           
MuleEndpointURI(java.lang.String uri, MuleContext muleContext)
           
MuleEndpointURI(java.lang.String uri, java.lang.String encodedUri, MuleContext muleContext)
          Creates but does not initialize the endpoint URI.
MuleEndpointURI(java.lang.String address, java.lang.String endpointName, java.lang.String connectorName, java.lang.String transformers, java.lang.String responseTransformers, java.util.Properties properties, java.net.URI uri, MuleContext muleContext)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getAddress()
           
 java.lang.String getAuthority()
           
 java.lang.String getConnectorName()
           
 java.lang.String getEndpointName()
           
 java.lang.String getFilterAddress()
           
 java.lang.String getFragment()
           
 java.lang.String getFullScheme()
           
 java.lang.String getHost()
           
 MuleContext getMuleContext()
           
 java.util.Properties getParams()
           
 java.lang.String getPassword()
           
 java.lang.String getPath()
           
 int getPort()
           
 java.lang.String getQuery()
           
 java.lang.String getRawAuthority()
           
 java.lang.String getRawFragment()
           
 java.lang.String getRawPath()
           
 java.lang.String getRawQuery()
           
 java.lang.String getRawSchemeSpecificPart()
           
 java.lang.String getRawUserInfo()
           
 java.lang.String getResourceInfo()
           
 java.lang.String getResponseTransformers()
           
 java.lang.String getScheme()
           
 java.lang.String getSchemeMetaInfo()
           
 java.lang.String getSchemeSpecificPart()
           
 java.lang.String getTransformers()
           
 java.net.URI getUri()
           
 java.lang.String getUser()
           
 java.lang.String getUserInfo()
           
 java.util.Properties getUserParams()
          A reduced version of getParams() - drops some system parameters
 int hashCode()
           
 void initialise()
          Method used to perform any initialisation work.
 boolean isAbsolute()
           
 boolean isDynamic()
           
static boolean isMuleUri(java.lang.String url)
           
 boolean isOpaque()
           
 java.net.URI normalize()
           
 java.net.URI parseServerAuthority()
           
protected  java.lang.String preprocessUri(java.lang.String uri)
           
 java.net.URI relativize(java.net.URI uri)
           
 java.net.URI resolve(java.lang.String str)
           
 java.net.URI resolve(java.net.URI uri)
           
 java.lang.String toString()
           
protected  boolean validateUrl(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
logger used by this class

Constructor Detail

MuleEndpointURI

public MuleEndpointURI(java.lang.String address,
                       java.lang.String endpointName,
                       java.lang.String connectorName,
                       java.lang.String transformers,
                       java.lang.String responseTransformers,
                       java.util.Properties properties,
                       java.net.URI uri,
                       MuleContext muleContext)

MuleEndpointURI

public MuleEndpointURI(EndpointURI endpointUri)

MuleEndpointURI

public MuleEndpointURI(EndpointURI endpointUri,
                       java.lang.String filterAddress)

MuleEndpointURI

public MuleEndpointURI(java.lang.String uri,
                       MuleContext muleContext)
                throws EndpointException
Throws:
EndpointException

MuleEndpointURI

public MuleEndpointURI(java.lang.String uri,
                       java.lang.String encodedUri,
                       MuleContext muleContext)
                throws EndpointException
Creates but does not initialize the endpoint URI. It is up to the caller to call initialise() at some point.

Throws:
EndpointException
Method Detail

isMuleUri

public static boolean isMuleUri(java.lang.String url)

preprocessUri

protected java.lang.String preprocessUri(java.lang.String uri)
                                  throws MalformedEndpointException
Throws:
MalformedEndpointException

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

validateUrl

protected boolean validateUrl(java.lang.String url)

getAddress

public java.lang.String getAddress()
Specified by:
getAddress in interface EndpointURI

getEndpointName

public java.lang.String getEndpointName()
Specified by:
getEndpointName in interface EndpointURI

getParams

public java.util.Properties getParams()
Specified by:
getParams in interface EndpointURI

getUserParams

public java.util.Properties getUserParams()
Description copied from interface: EndpointURI
A reduced version of getParams() - drops some system parameters

Specified by:
getUserParams in interface EndpointURI

parseServerAuthority

public java.net.URI parseServerAuthority()
                                  throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

normalize

public java.net.URI normalize()

resolve

public java.net.URI resolve(java.net.URI uri)

resolve

public java.net.URI resolve(java.lang.String str)

relativize

public java.net.URI relativize(java.net.URI uri)

getScheme

public java.lang.String getScheme()
Specified by:
getScheme in interface EndpointURI

getFullScheme

public java.lang.String getFullScheme()
Specified by:
getFullScheme in interface EndpointURI

isAbsolute

public boolean isAbsolute()

isOpaque

public boolean isOpaque()

getRawSchemeSpecificPart

public java.lang.String getRawSchemeSpecificPart()

getSchemeSpecificPart

public java.lang.String getSchemeSpecificPart()

getRawAuthority

public java.lang.String getRawAuthority()

getAuthority

public java.lang.String getAuthority()
Specified by:
getAuthority in interface EndpointURI

getRawUserInfo

public java.lang.String getRawUserInfo()

getUserInfo

public java.lang.String getUserInfo()
Specified by:
getUserInfo in interface EndpointURI

getHost

public java.lang.String getHost()
Specified by:
getHost in interface EndpointURI

getPort

public int getPort()
Specified by:
getPort in interface EndpointURI

getRawPath

public java.lang.String getRawPath()

getPath

public java.lang.String getPath()
Specified by:
getPath in interface EndpointURI

getRawQuery

public java.lang.String getRawQuery()

getQuery

public java.lang.String getQuery()
Specified by:
getQuery in interface EndpointURI

getRawFragment

public java.lang.String getRawFragment()

getFragment

public java.lang.String getFragment()

toString

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

getTransformers

public java.lang.String getTransformers()
Specified by:
getTransformers in interface EndpointURI

getUri

public java.net.URI getUri()
Specified by:
getUri in interface EndpointURI

getConnectorName

public java.lang.String getConnectorName()
Specified by:
getConnectorName in interface EndpointURI

getSchemeMetaInfo

public java.lang.String getSchemeMetaInfo()
Specified by:
getSchemeMetaInfo in interface EndpointURI

getResourceInfo

public java.lang.String getResourceInfo()
Specified by:
getResourceInfo in interface EndpointURI

getFilterAddress

public java.lang.String getFilterAddress()
Specified by:
getFilterAddress in interface EndpointURI

getUser

public java.lang.String getUser()
Specified by:
getUser in interface EndpointURI

getResponseTransformers

public java.lang.String getResponseTransformers()
Specified by:
getResponseTransformers in interface EndpointURI

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface EndpointURI

getMuleContext

public MuleContext getMuleContext()
Specified by:
getMuleContext in interface EndpointURI

isDynamic

public boolean isDynamic()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.