org.mule.endpoint
Class DynamicURIInboundEndpoint

java.lang.Object
  extended by org.mule.endpoint.DynamicURIInboundEndpoint
All Implemented Interfaces:
Serializable, ImmutableEndpoint, InboundEndpoint, MessageRequesting

public class DynamicURIInboundEndpoint
extends Object
implements InboundEndpoint

Allow's EndpointURI to be set and changed dynamically by wrapping up an immutable endpoint instance.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.mule.api.endpoint.ImmutableEndpoint
INITIAL_STATE_STARTED, INITIAL_STATE_STOPPED
 
Fields inherited from interface org.mule.api.transport.MessageRequesting
REQUEST_NO_WAIT, REQUEST_WAIT_INDEFINITELY
 
Constructor Summary
DynamicURIInboundEndpoint(InboundEndpoint endpoint)
           
DynamicURIInboundEndpoint(InboundEndpoint endpoint, EndpointURI dynamicEndpointURI)
           
 
Method Summary
 boolean equals(Object obj)
           
 ConnectionStrategy getConnectionStrategy()
          Returns the connection strategy this endpoint should use when connecting to the underlying resource
 Connector getConnector()
          The endpoint that will be used to send the message on.
 String getEncoding()
          Decides the encoding to be used for events received by this endpoint
 EndpointURI getEndpointURI()
          This specifess the communication endpointUri.
 Filter getFilter()
          The filter to apply to incoming messages.
 String getInitialState()
          Sets the state the endpoint will be loaded in.
 MuleContext getMuleContext()
           
 String getName()
          The name is the identifier for the endpoint
 Map getProperties()
          Returns any properties set on this endpoint
 Object getProperty(Object key)
          Retrieves a property set on the endpoint
 String getProtocol()
          The transport protocol name that the message endpoint communicates over.
 int getRemoteSyncTimeout()
          The timeout value for remoteSync invocations
 List getResponseTransformers()
          The transformers used when a response is returned from invoking this endpoint.
 EndpointSecurityFilter getSecurityFilter()
          Returns an EndpointSecurityFilter for this endpoint.
 TransactionConfig getTransactionConfig()
          Returns the transaction configuration for this endpoint
 List getTransformers()
          Transformers are responsible for transforming data when it is received or sent by the UMO (depending on whether this endpoint is a receiver or not).
 int hashCode()
           
 boolean isDeleteUnacceptedMessages()
          If a filter is configured on this endpoint, this property will determine if message that are not excepted by the filter are deleted
 boolean isReadOnly()
           
 boolean isRemoteSync()
          For certain providers that support the notion of a backchannel such as sockets (outputStream) or Jms (ReplyTo) Mule can automatically wait for a response from a backchannel when dispatching over these protocols.
 boolean isSynchronous()
          Determines if requests originating from this endpoint should be synchronous i.e.
 MuleMessage request(long timeout)
          Make a specific request to the underlying transport
 void setEndpointURI(EndpointURI dynamicEndpointURI)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicURIInboundEndpoint

public DynamicURIInboundEndpoint(InboundEndpoint endpoint)

DynamicURIInboundEndpoint

public DynamicURIInboundEndpoint(InboundEndpoint endpoint,
                                 EndpointURI dynamicEndpointURI)
Method Detail

getEndpointURI

public EndpointURI getEndpointURI()
Description copied from interface: ImmutableEndpoint
This specifess the communication endpointUri. This will have a different format depending on the transport protocol being used i.e.

if an endpointUri is not specifed it will be assumed that it will be determined at run-time by the calling application. The endpointUri can be aliteral endpointUri such as an email address or it can be a logical name for an endpointUri as long as it is declared in a message-endpointUri block. When the message-provider is created the endpointUri is first lookup in the endpointUri registry and if nothing is returned the endpointUri value itself is used.

Specified by:
getEndpointURI in interface ImmutableEndpoint
Returns:
the endpointUri on which the endpoint sends or receives data

setEndpointURI

public void setEndpointURI(EndpointURI dynamicEndpointURI)

getConnectionStrategy

public ConnectionStrategy getConnectionStrategy()
Description copied from interface: ImmutableEndpoint
Returns the connection strategy this endpoint should use when connecting to the underlying resource

Specified by:
getConnectionStrategy in interface ImmutableEndpoint
Returns:
the connection strategy this endpoint should use when connecting to the underlying resource

getConnector

public Connector getConnector()
Description copied from interface: ImmutableEndpoint
The endpoint that will be used to send the message on. It is important that the endpointUri and the connection correlate i.e. if your endpointUri is a jms queue your connection must be a JMS endpoint.

Specified by:
getConnector in interface ImmutableEndpoint
Returns:
the endpoint associated with the endpoint

getEncoding

public String getEncoding()
Description copied from interface: ImmutableEndpoint
Decides the encoding to be used for events received by this endpoint

Specified by:
getEncoding in interface ImmutableEndpoint
Returns:
the encoding set on the endpoint or null if no codin has been specified

getFilter

public Filter getFilter()
Description copied from interface: ImmutableEndpoint
The filter to apply to incoming messages. Only applies when the endpoint endpointUri is a receiver

Specified by:
getFilter in interface ImmutableEndpoint
Returns:
the Filter to use or null if one is not set

getInitialState

public String getInitialState()
Description copied from interface: ImmutableEndpoint
Sets the state the endpoint will be loaded in. The States are 'stopped' and 'started' (default)

Specified by:
getInitialState in interface ImmutableEndpoint
Returns:
the endpoint starting state

getMuleContext

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

getName

public String getName()
Description copied from interface: ImmutableEndpoint
The name is the identifier for the endpoint

Specified by:
getName in interface ImmutableEndpoint
Returns:
the endpoint name

getProperties

public Map getProperties()
Description copied from interface: ImmutableEndpoint
Returns any properties set on this endpoint

Specified by:
getProperties in interface ImmutableEndpoint
Returns:
a map of properties for this endpoint

getProperty

public Object getProperty(Object key)
Description copied from interface: ImmutableEndpoint
Retrieves a property set on the endpoint

Specified by:
getProperty in interface ImmutableEndpoint
Parameters:
key - the name of the property
Returns:
the property value or null if it does not exist

getProtocol

public String getProtocol()
Description copied from interface: ImmutableEndpoint
The transport protocol name that the message endpoint communicates over. i.e. jms, sms, smtp etc. The protocol must match that of the associated endpoint

Specified by:
getProtocol in interface ImmutableEndpoint
Returns:
the protocol name

getRemoteSyncTimeout

public int getRemoteSyncTimeout()
Description copied from interface: ImmutableEndpoint
The timeout value for remoteSync invocations

Specified by:
getRemoteSyncTimeout in interface ImmutableEndpoint
Returns:
the timeout in milliseconds

getResponseTransformers

public List getResponseTransformers()
Description copied from interface: ImmutableEndpoint
The transformers used when a response is returned from invoking this endpoint. If an endpoint has no response transformers an empty list is returned.

Specified by:
getResponseTransformers in interface ImmutableEndpoint
Returns:
the transformer to use when receiving the response data

getSecurityFilter

public EndpointSecurityFilter getSecurityFilter()
Description copied from interface: ImmutableEndpoint
Returns an EndpointSecurityFilter for this endpoint. If one is not set, there will be no authentication on events sent via this endpoint

Specified by:
getSecurityFilter in interface ImmutableEndpoint
Returns:
EndpointSecurityFilter responsible for authenticating message flow via this endpoint.
See Also:
EndpointSecurityFilter

getTransactionConfig

public TransactionConfig getTransactionConfig()
Description copied from interface: ImmutableEndpoint
Returns the transaction configuration for this endpoint

Specified by:
getTransactionConfig in interface ImmutableEndpoint
Returns:
the transaction configuration for this endpoint or null if the endpoint is not transactional

getTransformers

public List getTransformers()
Description copied from interface: ImmutableEndpoint
Transformers are responsible for transforming data when it is received or sent by the UMO (depending on whether this endpoint is a receiver or not). A tranformation for an inbound event can be forced by the user by calling the inbound event.getTransformedMessage(). A tranformation for an outbound event is called or when the UMO dispatchEvent() or sendEvent() methods are called. If an endpoint has no transformers an empty list is returned.

Specified by:
getTransformers in interface ImmutableEndpoint
Returns:
the transformers to use when receiving or sending data

isDeleteUnacceptedMessages

public boolean isDeleteUnacceptedMessages()
Description copied from interface: ImmutableEndpoint
If a filter is configured on this endpoint, this property will determine if message that are not excepted by the filter are deleted

Specified by:
isDeleteUnacceptedMessages in interface ImmutableEndpoint
Returns:
true if message should be deleted, false otherwise

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface ImmutableEndpoint
Returns:
true if this endpoint is read-only and none of it's properties can change. Global endpoints should be read-only so that unexpected behaviour is avoided.

isRemoteSync

public boolean isRemoteSync()
Description copied from interface: ImmutableEndpoint
For certain providers that support the notion of a backchannel such as sockets (outputStream) or Jms (ReplyTo) Mule can automatically wait for a response from a backchannel when dispatching over these protocols. This is different for synchronous as synchronous behavior only applies to in

Specified by:
isRemoteSync in interface ImmutableEndpoint

isSynchronous

public boolean isSynchronous()
Description copied from interface: ImmutableEndpoint
Determines if requests originating from this endpoint should be synchronous i.e. execute in a single thread and possibly return an result. This property is only used when the endpoint is of type 'receiver'

Specified by:
isSynchronous in interface ImmutableEndpoint
Returns:
whether requests on this endpoint should execute in a single thread. This property is only used when the endpoint is of type 'receiver'

request

public MuleMessage request(long timeout)
                    throws Exception
Description copied from interface: MessageRequesting
Make a specific request to the underlying transport

Specified by:
request in interface MessageRequesting
Parameters:
timeout - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
Returns:
the result of the request wrapped in a MuleMessage object. Null will be returned if no data was avaialable
Throws:
Exception - if the call to the underlying protocal causes an exception

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.