org.mule.umo.endpoint
Interface UMOEndpoint

All Superinterfaces:
Cloneable, Initialisable, Serializable, UMOImmutableEndpoint, UMOMessageDispatching
All Known Implementing Classes:
MuleEndpoint

public interface UMOEndpoint
extends UMOImmutableEndpoint

UMOEndpoint describes a Provider in the Mule Server. A endpoint is a grouping of an endpoint, an endpointUri and a transformer.

Version:
$Revision: 7976 $
Author:
Ross Mason

Field Summary
 
Fields inherited from interface org.mule.umo.endpoint.UMOImmutableEndpoint
ENDPOINT_TYPE_RECEIVER, ENDPOINT_TYPE_RESPONSE, ENDPOINT_TYPE_SENDER, ENDPOINT_TYPE_SENDER_AND_RECEIVER, INITIAL_STATE_STARTED, INITIAL_STATE_STOPPED
 
Fields inherited from interface org.mule.umo.provider.UMOMessageDispatching
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
Method Summary
 UMOTransactionConfig getTransactionConfig()
          Returns the transaction configuration for this endpoint
 void setConnector(UMOConnector connector)
          The endpoint that will be used to send the message on.
 void setCreateConnector(int action)
          This attribute determines how a connector is obtained for the endpoint.
 void setDeleteUnacceptedMessages(boolean delete)
          If a filter is configured on this endpoint, this property will determine if message that are not excepted by the filter are deleted
 void setEncoding(String endpointEncoding)
          Sets the encoding to be used for events received by this endpoint
 void setEndpointURI(UMOEndpointURI endpointUri)
          This specifes the communication endpointUri.
 void setFilter(UMOFilter filter)
          The filter to apply to incoming messages
 void setInitialState(String state)
          Sets the state the endpoint will be loaded in.
 void setName(String name)
           
 void setProperties(Map props)
           
 void setProperty(String key, Object value)
          Sets a property on the endpoint
 void setRemoteSync(boolean value)
          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.
 void setRemoteSyncTimeout(int timeout)
          The timeout value for remoteSync invocations
 void setResponseTransformer(UMOTransformer trans)
          Sets tyhe transformer used when a response is sent back from the endpoint invocation
 void setSecurityFilter(UMOEndpointSecurityFilter filter)
          Sets an UMOEndpointSecurityFilter for this endpoint.
 void setStreaming(boolean stream)
          Determines whether the endpoint should deal with requests as streams
 void setSynchronous(boolean synchronous)
          Determines if requests originating from this endpoint should be synchronous i.e.
 void setTransactionConfig(UMOTransactionConfig config)
          Sets the Transaction configuration for the endpoint
 void setTransformer(UMOTransformer trans)
          The transformer is responsible for transforming data when it is received or sent by the UMO (depending on whether this endpoint is a receiver or not).
 void setType(String type)
          Determines whether the message endpoint is a sender or receiver or both.
 
Methods inherited from interface org.mule.umo.endpoint.UMOImmutableEndpoint
canReceive, canSend, clone, getConnector, getCreateConnector, getEncoding, getEndpointURI, getFilter, getInitialState, getName, getProperties, getProperty, getProtocol, getRemoteSyncTimeout, getResponseTransformer, getSecurityFilter, getTransformer, getType, isDeleteUnacceptedMessages, isReadOnly, isRemoteSync, isStreaming, isSynchronous, isSynchronousSet
 
Methods inherited from interface org.mule.umo.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.umo.provider.UMOMessageDispatching
dispatch, receive, send
 

Method Detail

setEndpointURI

public void setEndpointURI(UMOEndpointURI endpointUri)
                    throws EndpointException
This specifes 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.

Parameters:
endpointUri - the endpointUri on which the Endpoint sends or receives data
Throws:
EndpointException - thrown if the EndpointUri cannot be processed by the Endpoint

setEncoding

public void setEncoding(String endpointEncoding)
Sets the encoding to be used for events received by this endpoint

Parameters:
endpointEncoding - the encoding set on the endpoint. If not set the encoding will be taken from the manager config

setType

public void setType(String type)
Determines whether the message endpoint is a sender or receiver or both. The possible values are-

Parameters:
type - the endpoint type

setConnector

public void setConnector(UMOConnector connector)
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.

Parameters:
connector - the endpoint to associate with the endpoint

setName

public void setName(String name)
Parameters:
name - the name to identify the endpoint

setTransformer

public void setTransformer(UMOTransformer trans)
The transformer is 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.

This attribute represents the name of the transformer to use as declared in the transformers section of the configuration file. IF a name for the transformer is not set on the configuration element, it will default to the name of the className attribute minus the package name.

Parameters:
trans - the transformer to use when receiving or sending data

setResponseTransformer

public void setResponseTransformer(UMOTransformer trans)
Sets tyhe transformer used when a response is sent back from the endpoint invocation

Parameters:
trans - the transformer to use

setProperties

public void setProperties(Map props)
Parameters:
props - properties for this endpoint

getTransactionConfig

public UMOTransactionConfig getTransactionConfig()
Returns the transaction configuration for this endpoint

Specified by:
getTransactionConfig in interface UMOImmutableEndpoint
Returns:
transaction config for this endpoint

setTransactionConfig

public void setTransactionConfig(UMOTransactionConfig config)
Sets the Transaction configuration for the endpoint

Parameters:
config - the transaction config to use by this endpoint

setFilter

public void setFilter(UMOFilter filter)
The filter to apply to incoming messages

Parameters:
filter - the filter to use

setDeleteUnacceptedMessages

public void setDeleteUnacceptedMessages(boolean delete)
If a filter is configured on this endpoint, this property will determine if message that are not excepted by the filter are deleted

Parameters:
delete - if message should be deleted, false otherwise

setSecurityFilter

public void setSecurityFilter(UMOEndpointSecurityFilter filter)
Sets an UMOEndpointSecurityFilter for this endpoint. If a filter is set all traffice via this endpoint with be subject to authentication.

Parameters:
filter - the UMOSecurityFilter responsible for authenticating message flow via this endpoint.
See Also:
UMOEndpointSecurityFilter

setSynchronous

public void setSynchronous(boolean synchronous)
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'.

Parameters:
synchronous - whether requests on this endpoint should execute in a single thread. This property is only used when the endpoint is of type 'receiver'

setProperty

public void setProperty(String key,
                        Object value)
Sets a property on the endpoint

Parameters:
key - the property key
value - the value of the property

setCreateConnector

public void setCreateConnector(int action)
This attribute determines how a connector is obtained for the endpoint. The options are - GET_OR_CREATE_CONNECTOR = 0: create a connector for the endpoint if one isn't already register (default) ALWAYS_CREATE_CONNECTOR = 1: Always create a new connector of each endpoint NEVER_CREATE_CONNECTOR = 2: Throw an exception if there is not connector with a matching protocol for this endpoint

Parameters:
action -

setRemoteSync

public void setRemoteSync(boolean value)
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

Parameters:
value - whether the endpoint should perfrom sync receives

setRemoteSyncTimeout

public void setRemoteSyncTimeout(int timeout)
The timeout value for remoteSync invocations

Parameters:
timeout - the timeout in milliseconds

setInitialState

public void setInitialState(String state)
Sets the state the endpoint will be loaded in. The States are 'stopped' and 'started' (default)

Parameters:
state -

setStreaming

public void setStreaming(boolean stream)
Determines whether the endpoint should deal with requests as streams

Parameters:
stream - true if the request should be streamed


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