|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.impl.ImmutableMuleEndpoint
public class ImmutableMuleEndpoint
ImmutableMuleEndpoint
describes a Provider in the Mule Server. A
endpoint is a grouping of an endpoint, an endpointUri and a transformer.
Field Summary | |
---|---|
protected UMOConnector |
connector
The endpoint used to communicate with the external system |
protected int |
createConnector
determines if a new connector should be created for this endpoint |
protected boolean |
deleteUnacceptedMessages
determines whether unaccepted filtered events should be removed from the source. |
protected String |
endpointEncoding
|
protected UMOEndpointURI |
endpointUri
The endpointUri on which to send or receive information |
protected UMOFilter |
filter
event filter for this endpoint |
protected AtomicBoolean |
initialised
has this endpoint been initialised |
protected String |
initialState
The state that the endpoint is initialised in such as started or stopped |
protected static Log |
logger
logger used by this class |
protected String |
name
The name for the endpoint |
protected Map |
properties
Any additional properties for the endpoint |
protected Boolean |
remoteSync
Determines whether a synchronous call should block to obtain a response from a remote server (if the transport supports it). |
protected Integer |
remoteSyncTimeout
How long to block when performing a remote synchronisation to a remote host. |
protected UMOTransformer |
responseTransformer
The transformer used to transform the incoming or outgoing data |
protected UMOEndpointSecurityFilter |
securityFilter
The security filter to apply to this endpoint |
protected boolean |
streaming
Determines whether the endpoint should deal with requests as streams |
protected Boolean |
synchronous
whether events received by this endpoint should execute in a single thread |
protected UMOTransactionConfig |
transactionConfig
The transaction configuration for this endpoint |
protected UMOTransformer |
transformer
The transformer used to transform the incoming or outgoing data |
protected String |
type
Determines whether the endpoint is a receiver or sender or both |
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 |
Constructor Summary | |
---|---|
ImmutableMuleEndpoint(String endpointName,
boolean receiver)
|
|
ImmutableMuleEndpoint(String name,
UMOEndpointURI endpointUri,
UMOConnector connector,
UMOTransformer transformer,
String type,
int createConnector,
String endpointEncoding,
Map props)
|
|
ImmutableMuleEndpoint(UMOImmutableEndpoint source)
|
Method Summary | |
---|---|
boolean |
canReceive()
Determines whether this endpoint can be used to receive events |
boolean |
canSend()
Determines whether this endpoint can be used to send events |
Object |
clone()
Make a deep copy of this endpoint |
static UMOEndpoint |
createEndpointFromUri(UMOEndpointURI uri,
String type)
|
void |
dispatch(UMOEvent event)
Dispatches an event from the endpoint to the external system |
boolean |
equals(Object o)
|
UMOConnector |
getConnector()
The endpoint that will be used to send the message on. |
int |
getCreateConnector()
Determines if a new connector is created for this endpoint or an exising one must already be present |
String |
getEncoding()
Decides the encoding to be used for events received by this endpoint |
static UMOEndpoint |
getEndpointFromUri(String uri)
|
static UMOEndpoint |
getEndpointFromUri(UMOEndpointURI uri)
|
UMOEndpointURI |
getEndpointURI()
This specifes the communication endpointUri. |
UMOFilter |
getFilter()
The filter to apply to incoming messages. |
String |
getInitialState()
Sets the state the endpoint will be loaded in. |
String |
getName()
The name is the identifier for the endpoint |
static UMOEndpoint |
getOrCreateEndpointForUri(String uriIdentifier,
String type)
|
static UMOEndpoint |
getOrCreateEndpointForUri(UMOEndpointURI uri,
String type)
|
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 |
UMOTransformer |
getResponseTransformer()
The transformer used when a response is returned from invoking this endpoint |
UMOEndpointSecurityFilter |
getSecurityFilter()
Returns an UMOEndpointSecurityFilter for this endpoint. |
UMOTransactionConfig |
getTransactionConfig()
Returns the transaction configuration for this endpoint |
UMOTransformer |
getTransformer()
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). |
String |
getType()
Determines whether the message endpoint is a sender or receiver or both. |
int |
hashCode()
|
protected void |
initFromDescriptor(UMOImmutableEndpoint source)
|
void |
initialise()
Method used to perform any initialisation work. |
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 |
isStreaming()
Determines whether the endpoint should deal with requests as streams |
boolean |
isSynchronous()
Determines if requests originating from this endpoint should be synchronous i.e. |
boolean |
isSynchronousSet()
Determines if the synchronous porperty has been set on the endpoint |
UMOMessage |
receive(long timeout)
Make a specific request to the underlying transport |
UMOMessage |
send(UMOEvent event)
Sends an event from the endpoint to the external system |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
protected UMOConnector connector
protected UMOEndpointURI endpointUri
protected UMOTransformer transformer
protected UMOTransformer responseTransformer
protected String name
protected String type
protected Map properties
protected UMOTransactionConfig transactionConfig
protected UMOFilter filter
protected boolean deleteUnacceptedMessages
protected AtomicBoolean initialised
protected UMOEndpointSecurityFilter securityFilter
protected Boolean synchronous
protected Boolean remoteSync
protected Integer remoteSyncTimeout
protected boolean streaming
protected String initialState
protected String endpointEncoding
protected int createConnector
Constructor Detail |
---|
public ImmutableMuleEndpoint(String name, UMOEndpointURI endpointUri, UMOConnector connector, UMOTransformer transformer, String type, int createConnector, String endpointEncoding, Map props)
public ImmutableMuleEndpoint(UMOImmutableEndpoint source)
public ImmutableMuleEndpoint(String endpointName, boolean receiver) throws UMOException
UMOException
Method Detail |
---|
protected void initFromDescriptor(UMOImmutableEndpoint source)
public UMOEndpointURI getEndpointURI()
UMOImmutableEndpoint
getEndpointURI
in interface UMOImmutableEndpoint
public String getEncoding()
UMOImmutableEndpoint
getEncoding
in interface UMOImmutableEndpoint
public String getType()
UMOImmutableEndpoint
getType
in interface UMOImmutableEndpoint
public UMOConnector getConnector()
UMOImmutableEndpoint
getConnector
in interface UMOImmutableEndpoint
public String getName()
UMOImmutableEndpoint
getName
in interface UMOImmutableEndpoint
public UMOTransformer getTransformer()
UMOImmutableEndpoint
getTransformer
in interface UMOImmutableEndpoint
public Map getProperties()
UMOImmutableEndpoint
getProperties
in interface UMOImmutableEndpoint
public Object clone()
UMOImmutableEndpoint
clone
in interface UMOImmutableEndpoint
clone
in class Object
public boolean isReadOnly()
isReadOnly
in interface UMOImmutableEndpoint
public String toString()
toString
in class Object
public String getProtocol()
UMOImmutableEndpoint
getProtocol
in interface UMOImmutableEndpoint
public boolean canReceive()
UMOImmutableEndpoint
canReceive
in interface UMOImmutableEndpoint
public boolean canSend()
UMOImmutableEndpoint
canSend
in interface UMOImmutableEndpoint
public UMOTransactionConfig getTransactionConfig()
UMOImmutableEndpoint
getTransactionConfig
in interface UMOImmutableEndpoint
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public UMOFilter getFilter()
UMOImmutableEndpoint
getFilter
in interface UMOImmutableEndpoint
public static UMOEndpoint createEndpointFromUri(UMOEndpointURI uri, String type) throws UMOException
UMOException
public static UMOEndpoint getEndpointFromUri(String uri)
public static UMOEndpoint getEndpointFromUri(UMOEndpointURI uri) throws UMOException
UMOException
public static UMOEndpoint getOrCreateEndpointForUri(String uriIdentifier, String type) throws UMOException
UMOException
public static UMOEndpoint getOrCreateEndpointForUri(UMOEndpointURI uri, String type) throws UMOException
UMOException
public boolean isDeleteUnacceptedMessages()
UMOImmutableEndpoint
isDeleteUnacceptedMessages
in interface UMOImmutableEndpoint
public void initialise() throws InitialisationException
Initialisable
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.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule
instance to shutdown
RecoverableException
- if an error occurs that can be recovered frompublic UMOEndpointSecurityFilter getSecurityFilter()
getSecurityFilter
in interface UMOImmutableEndpoint
UMOEndpointSecurityFilter
public boolean isSynchronous()
isSynchronous
in interface UMOImmutableEndpoint
public boolean isSynchronousSet()
UMOImmutableEndpoint
isSynchronousSet
in interface UMOImmutableEndpoint
public int getCreateConnector()
UMOImmutableEndpoint
getCreateConnector
in interface UMOImmutableEndpoint
public boolean isRemoteSync()
isRemoteSync
in interface UMOImmutableEndpoint
public int getRemoteSyncTimeout()
getRemoteSyncTimeout
in interface UMOImmutableEndpoint
public String getInitialState()
getInitialState
in interface UMOImmutableEndpoint
public UMOTransformer getResponseTransformer()
UMOImmutableEndpoint
getResponseTransformer
in interface UMOImmutableEndpoint
public boolean isStreaming()
isStreaming
in interface UMOImmutableEndpoint
public Object getProperty(Object key)
UMOImmutableEndpoint
getProperty
in interface UMOImmutableEndpoint
key
- the name of the property
public void dispatch(UMOEvent event) throws DispatchException
UMOMessageDispatching
dispatch
in interface UMOMessageDispatching
event
- The event to dispatch
DispatchException
- if the event fails to be dispatchedpublic UMOMessage receive(long timeout) throws Exception
UMOMessageDispatching
receive
in interface UMOMessageDispatching
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
Exception
- if the call to the underlying protocal cuases an exceptionpublic UMOMessage send(UMOEvent event) throws DispatchException
UMOMessageDispatching
send
in interface UMOMessageDispatching
event
- The event to send
DispatchException
- if the event fails to be dispatched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |