org.apache.servicemix.nmr.api
Interface Endpoint

All Known Subinterfaces:
InternalEndpoint

public interface Endpoint

Represents an endpoint to expose in the NMR. Exposing an endpoint in the NMR is done using the (@link EndpointRegistry}. The endpoint will be given Exchange to process and must be prepared to be given several exchanges concurrently for processing.

Since:
4.0
Version:
$Revision: $

Field Summary
static java.lang.String ENDPOINT_NAME
          Meta-data key for the endpoint name
static java.lang.String INTERFACE_NAME
          Meta-data key for the interface name
static java.lang.String NAME
          Meta-data key for the unique endpoint name
static java.lang.String SERVICE_NAME
          Meta-data key for the service QName
static java.lang.String UNTARGETABLE
          If this property is set to true on a given endpoint, it won't be used as a target for any exchange
static java.lang.String VERSION
          Meta-data for the version number of this endpoint
static java.lang.String WSDL_URL
          Meta-data key for the WSDL url
 
Method Summary
 void process(Exchange exchange)
          Process the given exchange.
 void setChannel(Channel channel)
          Set the channel so that the endpoint can send exchanges back when they are processed or act as a consumer itself.
 

Field Detail

NAME

static final java.lang.String NAME
Meta-data key for the unique endpoint name

See Also:
Constant Field Values

INTERFACE_NAME

static final java.lang.String INTERFACE_NAME
Meta-data key for the interface name

See Also:
Constant Field Values

SERVICE_NAME

static final java.lang.String SERVICE_NAME
Meta-data key for the service QName

See Also:
Constant Field Values

ENDPOINT_NAME

static final java.lang.String ENDPOINT_NAME
Meta-data key for the endpoint name

See Also:
Constant Field Values

WSDL_URL

static final java.lang.String WSDL_URL
Meta-data key for the WSDL url

See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
Meta-data for the version number of this endpoint

See Also:
Constant Field Values

UNTARGETABLE

static final java.lang.String UNTARGETABLE
If this property is set to true on a given endpoint, it won't be used as a target for any exchange

See Also:
Constant Field Values
Method Detail

setChannel

void setChannel(Channel channel)
Set the channel so that the endpoint can send exchanges back when they are processed or act as a consumer itself. This method will be called by the NMR while the endpoint is registered. Such a channel does not need to be closed as the NMR will close it automatically when the endpoint is unregistered.

Parameters:
channel - the channel that this endpoint can use
See Also:
EndpointRegistry.register(Endpoint, java.util.Map)

process

void process(Exchange exchange)
Process the given exchange. The processing can occur in the current thread or asynchronously. If an endpoint has sent an exchange asynchronously to another endpoint, it will receive the exchange back using this method. An endpoint can recognized such exchanges by checking the role of the exchange.

Parameters:
exchange - the exchange to process


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.