org.mule.impl.endpoint
Class MuleEndpoint

java.lang.Object
  extended byorg.mule.impl.ImmutableMuleEndpoint
      extended byorg.mule.impl.endpoint.MuleEndpoint
All Implemented Interfaces:
java.lang.Cloneable, Initialisable, java.io.Serializable, UMOEndpoint, UMOImmutableEndpoint

public class MuleEndpoint
extends ImmutableMuleEndpoint
implements UMOEndpoint

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

Version:
$Revision: 1.3 $
Author:
Ross Mason
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mule.impl.ImmutableMuleEndpoint
connector, deleteUnacceptedMessages, endpointUri, filter, initialised, logger, name, properties, securityFilter, synchronous, transactionConfig, transformer, type
 
Fields inherited from interface org.mule.umo.endpoint.UMOImmutableEndpoint
ENDPOINT_TYPE_RECEIVER, ENDPOINT_TYPE_RESPONSE, ENDPOINT_TYPE_SENDER, ENDPOINT_TYPE_SENDER_AND_RECEIVER
 
Constructor Summary
MuleEndpoint()
          Default constructor This is required right now for the Mule digester to set the properties through the classes mutators
MuleEndpoint(java.lang.String endpoint, boolean receiver)
           
MuleEndpoint(java.lang.String name, UMOEndpointURI endpointUri, UMOConnector connector, UMOTransformer transformer, java.lang.String type, java.util.Map properties)
           
MuleEndpoint(UMOImmutableEndpoint endpoint)
           
 
Method Summary
 UMOImmutableEndpoint getImmutableProvider()
          Creates a read-only copy of the endpoint
 boolean isReadOnly()
           
 void setConnector(UMOConnector connector)
          The endpoint that will be used to send the message on.
 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 setEndpointURI(UMOEndpointURI endpointUri)
          This specifes the communication endpointUri.
 void setFilter(UMOFilter filter)
          The filter to apply to incoming messages
 void setName(java.lang.String name)
           
 void setProperties(java.util.Map props)
           
 void setSecurityFilter(UMOEndpointSecurityFilter filter)
          Sets an UMOEndpointSecurityFilter for this endpoint.
 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(java.lang.String type)
          Determines whether the message endpoint is a sender or receiver or both.
 
Methods inherited from class org.mule.impl.ImmutableMuleEndpoint
canReceive, canSend, clone, createEndpointFromUri, equals, getConnector, getEndpointFromUri, getEndpointFromUri, getEndpointURI, getFilter, getName, getOrCreateEndpointForUri, getOrCreateEndpointForUri, getProperties, getProtocol, getSecurityFilter, getTransactionConfig, getTransformer, getType, hashCode, initFromDescriptor, initialise, isDeleteUnacceptedMessages, isSynchronous, isSynchronousExplicitlySet, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.umo.endpoint.UMOEndpoint
getTransactionConfig
 
Methods inherited from interface org.mule.umo.endpoint.UMOImmutableEndpoint
canReceive, canSend, clone, getConnector, getEndpointURI, getFilter, getName, getProperties, getProtocol, getSecurityFilter, getTransformer, getType, isDeleteUnacceptedMessages, isSynchronous
 
Methods inherited from interface org.mule.umo.lifecycle.Initialisable
initialise
 

Constructor Detail

MuleEndpoint

public MuleEndpoint()
Default constructor This is required right now for the Mule digester to set the properties through the classes mutators


MuleEndpoint

public MuleEndpoint(java.lang.String name,
                    UMOEndpointURI endpointUri,
                    UMOConnector connector,
                    UMOTransformer transformer,
                    java.lang.String type,
                    java.util.Map properties)

MuleEndpoint

public MuleEndpoint(UMOImmutableEndpoint endpoint)

MuleEndpoint

public MuleEndpoint(java.lang.String endpoint,
                    boolean receiver)
             throws UMOException
Method Detail

setEndpointURI

public void setEndpointURI(UMOEndpointURI endpointUri)
                    throws EndpointException
Description copied from interface: UMOEndpoint
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.

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

setType

public void setType(java.lang.String type)
Description copied from interface: UMOEndpoint
Determines whether the message endpoint is a sender or receiver or both. The possible values are-

Specified by:
setType in interface UMOEndpoint
Parameters:
type - the endpoint type

setConnector

public void setConnector(UMOConnector connector)
Description copied from interface: UMOEndpoint
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:
setConnector in interface UMOEndpoint
Parameters:
connector - the endpoint to associate with the endpoint

setName

public void setName(java.lang.String name)
Specified by:
setName in interface UMOEndpoint
Parameters:
name - the name to identify the endpoint

setTransformer

public void setTransformer(UMOTransformer trans)
Description copied from interface: UMOEndpoint
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.

Specified by:
setTransformer in interface UMOEndpoint
Parameters:
trans - the transformer to use when receiving or sending data

setProperties

public void setProperties(java.util.Map props)
Specified by:
setProperties in interface UMOEndpoint
Parameters:
props - properties for this endpoint

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface UMOImmutableEndpoint
Overrides:
isReadOnly in class ImmutableMuleEndpoint

getImmutableProvider

public UMOImmutableEndpoint getImmutableProvider()
Creates a read-only copy of the endpoint

Returns:
read-only copy

setTransactionConfig

public void setTransactionConfig(UMOTransactionConfig config)
Description copied from interface: UMOEndpoint
Sets the Transaction configuration for the endpoint

Specified by:
setTransactionConfig in interface UMOEndpoint
Parameters:
config - the transaction config to use by this endpoint

setFilter

public void setFilter(UMOFilter filter)
Description copied from interface: UMOEndpoint
The filter to apply to incoming messages

Specified by:
setFilter in interface UMOEndpoint
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

Specified by:
setDeleteUnacceptedMessages in interface UMOEndpoint
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.

Specified by:
setSecurityFilter in interface UMOEndpoint
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'.

Specified by:
setSynchronous in interface UMOEndpoint
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'


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.