org.apache.servicemix.common.endpoints
Class ConsumerEndpoint

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.common.endpoints.SimpleEndpoint
          extended by org.apache.servicemix.common.endpoints.ConsumerEndpoint
All Implemented Interfaces:
Endpoint
Direct Known Subclasses:
PollingEndpoint

public abstract class ConsumerEndpoint
extends SimpleEndpoint


Field Summary
 
Fields inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
logger
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, service, serviceUnit
 
Constructor Summary
ConsumerEndpoint()
           
ConsumerEndpoint(DefaultComponent component, javax.jbi.servicedesc.ServiceEndpoint endpoint)
           
ConsumerEndpoint(ServiceUnit serviceUnit, javax.xml.namespace.QName service, java.lang.String endpoint)
           
 
Method Summary
 void activate()
          Register this endpoint into the NMR and put the endpoint in a STOPPED state, where the endpoint is able to process incoming requests, but won't consume external requests such as JMS messages or HTTP requests.
protected  void configureExchangeTarget(javax.jbi.messaging.MessageExchange exchange)
           
 void deactivate()
          Unregister this endpoint from the NMR.
 java.lang.String getLocationURI()
           Gets the URI identifying this external endpoint.
 javax.jbi.messaging.MessageExchange.Role getRole()
           Get the endpoint role.
 java.lang.String getTargetEndpoint()
           Gets the target endpoint of the consumer one.
 javax.xml.namespace.QName getTargetInterface()
           Gets the target interface qualified name of the endpoint.
 javax.xml.namespace.QName getTargetOperation()
           Gets the target operation name of the consumer endpoint.
 javax.xml.namespace.QName getTargetService()
           Gets the service qualified name of the endpoint.
 java.lang.String getTargetUri()
           Gets the target URI of the consumer endpoint.
 void setTargetEndpoint(java.lang.String targetEndpoint)
           Sets the endpoint name of the target endpoint.
 void setTargetInterface(javax.xml.namespace.QName targetInterface)
           Sets the name of the target interface.
 void setTargetOperation(javax.xml.namespace.QName targetOperation)
           Sets the name of the target operation.
 void setTargetService(javax.xml.namespace.QName targetService)
           Sets the name of the target service.
 void setTargetUri(java.lang.String targetUri)
           Sets the target service/endpoint/interface using a URI.
 void validate()
          Validate the endpoint at either deployment time for statically defined endpoints or at runtime for dynamic endpoints
 
Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync, start, stop
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, process, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsumerEndpoint

public ConsumerEndpoint()

ConsumerEndpoint

public ConsumerEndpoint(ServiceUnit serviceUnit,
                        javax.xml.namespace.QName service,
                        java.lang.String endpoint)

ConsumerEndpoint

public ConsumerEndpoint(DefaultComponent component,
                        javax.jbi.servicedesc.ServiceEndpoint endpoint)
Method Detail

getRole

public javax.jbi.messaging.MessageExchange.Role getRole()
Description copied from class: AbstractEndpoint

Get the endpoint role.

Specified by:
getRole in interface Endpoint
Specified by:
getRole in class AbstractEndpoint
Returns:
Returns the role.

activate

public void activate()
              throws java.lang.Exception
Description copied from interface: Endpoint
Register this endpoint into the NMR and put the endpoint in a STOPPED state, where the endpoint is able to process incoming requests, but won't consume external requests such as JMS messages or HTTP requests.

Specified by:
activate in interface Endpoint
Overrides:
activate in class SimpleEndpoint
Throws:
java.lang.Exception

deactivate

public void deactivate()
                throws java.lang.Exception
Description copied from interface: Endpoint
Unregister this endpoint from the NMR.

Specified by:
deactivate in interface Endpoint
Overrides:
deactivate in class SimpleEndpoint
Throws:
java.lang.Exception

getLocationURI

public java.lang.String getLocationURI()

Gets the URI identifying this external endpoint. This must be overriden so that endpoint resolution can work correctly.

Returns:
the URI identifying this external endpoint

getTargetEndpoint

public java.lang.String getTargetEndpoint()

Gets the target endpoint of the consumer one.

Returns:
the targetEndpoint

setTargetEndpoint

public void setTargetEndpoint(java.lang.String targetEndpoint)

Sets the endpoint name of the target endpoint.

Parameters:
targetEndpoint - a string specifiying the name of the target endpoint

getTargetInterface

public javax.xml.namespace.QName getTargetInterface()

Gets the target interface qualified name of the endpoint.

Returns:
the targetInterface

setTargetInterface

public void setTargetInterface(javax.xml.namespace.QName targetInterface)

Sets the name of the target interface.

Parameters:
targetInterface - a QName specifiying the name of the target interface

getTargetService

public javax.xml.namespace.QName getTargetService()

Gets the service qualified name of the endpoint.

Returns:
the targetService

setTargetService

public void setTargetService(javax.xml.namespace.QName targetService)

Sets the name of the target service.

Parameters:
targetService - a QName specifiying the name of the target interface

getTargetOperation

public javax.xml.namespace.QName getTargetOperation()

Gets the target operation name of the consumer endpoint.

Returns:
the targetOperation

setTargetOperation

public void setTargetOperation(javax.xml.namespace.QName targetOperation)

Sets the name of the target operation.

Parameters:
targetOperation - a QName specifiying the name of the target operation

getTargetUri

public java.lang.String getTargetUri()

Gets the target URI of the consumer endpoint.

Returns:
the targetUri

setTargetUri

public void setTargetUri(java.lang.String targetUri)

Sets the target service/endpoint/interface using a URI.

Parameters:
targetUri - the targetUri to set

configureExchangeTarget

protected void configureExchangeTarget(javax.jbi.messaging.MessageExchange exchange)

validate

public void validate()
              throws javax.jbi.management.DeploymentException
Description copied from class: AbstractEndpoint
Validate the endpoint at either deployment time for statically defined endpoints or at runtime for dynamic endpoints

Specified by:
validate in interface Endpoint
Overrides:
validate in class AbstractEndpoint
Throws:
javax.jbi.management.DeploymentException


Copyright © 2005-2012 FuseSource. All Rights Reserved.