Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.endpoint
Class DynamicURIOutboundEndpoint

    java.lang.Object
      org.mule.endpoint.DynamicURIOutboundEndpoint

All Implemented Interfaces:
  Serializable, ImmutableEndpoint, OutboundEndpoint, MessageDispatching

    public class DynamicURIOutboundEndpoint

extends Object
implements OutboundEndpoint

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.MessageDispatching
`RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY`

Constructor Summary
`DynamicURIOutboundEndpoint(OutboundEndpoint endpoint)`
`DynamicURIOutboundEndpoint(OutboundEndpoint endpoint, EndpointURI dynamicEndpointURI)`

Method Summary
`void` | `dispatch(MuleEvent event)` Dispatches an event from the endpoint to the external system
`boolean` | `equals(Object obj)`
`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
`String` | `getEndpointBuilderName()` The name of the endpoint builder used to create 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.
`List<String>` | `getResponseProperties()`
`int` | `getResponseTimeout()` The timeout value for waiting for a response from a remote invocation or back channel.
`List` | `getResponseTransformers()` The transformers used when a response is returned from invoking this endpoint.
`RetryPolicyTemplate` | `getRetryPolicyTemplate()` The retry policy on the endpoint configures how retries are handled.
`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 component (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` | `isSynchronous()` Determines if requests originating from this endpoint should be synchronous i.e.
`MuleMessage` | `send(MuleEvent event)` Sends an event from the endpoint to the external system
`void` | `setEndpointURI(EndpointURI dynamicEndpointURI)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DynamicURIOutboundEndpoint

    public DynamicURIOutboundEndpoint(OutboundEndpoint endpoint)

### DynamicURIOutboundEndpoint

    public DynamicURIOutboundEndpoint(OutboundEndpoint 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.
  - smtp -> admin@mycompany.com
  - jms -> shipping.orders.topic
  - sms -> +447910010010

  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)

### dispatch

    public void dispatch(MuleEvent event)
                  throws DispatchException

  Description copied from interface: `MessageDispatching`
  Dispatches an event from the endpoint to the external system

  Specified by:
    `dispatch` in interface `MessageDispatching`
  Parameters:
    `event` - The event to dispatch
  Throws:
    `DispatchException` - if the event fails to be dispatched

### getRetryPolicyTemplate

    public RetryPolicyTemplate getRetryPolicyTemplate()

  Description copied from interface: `ImmutableEndpoint`
  The retry policy on the endpoint configures how retries are handled. The behaviour is slightly different for inbound and outbound endpoints. For inbound endpoints the Retry Policy determines how the connection to the underlying transport will be managed if the connection is lost. For outbound endpoints, the Retry Policy will attempt to retry dispatching, sending and receiving an event

  Specified by:
    `getRetryPolicyTemplate` in interface `ImmutableEndpoint`
  Returns:
    the Policy factory to use when retrying a connection or dispatching an event

### 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

### getResponseTimeout

    public int getResponseTimeout()

  Description copied from interface: `ImmutableEndpoint`
  The timeout value for waiting for a response from a remote invocation or back channel. Mule will only wait for a response is the `ImmutableEndpoint.isSynchronous()` flag is set to true.

  Specified by:
    `getResponseTimeout` 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 component (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 Service 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.

### 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'

### getResponseProperties

    public List<String> getResponseProperties()

  Specified by:
    `getResponseProperties` in interface `OutboundEndpoint`
  Returns:
    a list of properties which should be carried over from the request message to the response message in the case of a synchronous call.

### send

    public MuleMessage send(MuleEvent event)
                     throws DispatchException

  Description copied from interface: `MessageDispatching`
  Sends an event from the endpoint to the external system

  Specified by:
    `send` in interface `MessageDispatching`
  Parameters:
    `event` - The event to send
  Returns:
    event the response form the external system wrapped in a MuleEvent
  Throws:
    `DispatchException` - if the event fails to be dispatched

### getEndpointBuilderName

    public String getEndpointBuilderName()

  Description copied from interface: `ImmutableEndpoint`
  The name of the endpoint builder used to create this endpoint. May be used to an endpoints builder for example to recreate endpoints for deserialized events.

  Specified by:
    `getEndpointBuilderName` in interface `ImmutableEndpoint`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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