|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.management.BaseLifeCycle
org.apache.servicemix.components.util.PojoSupport
org.apache.servicemix.components.util.ComponentSupport
public abstract class ComponentSupport
A useful base class for developers wishing to implement a JBI Component.
| Field Summary |
|---|
| Fields inherited from class org.apache.servicemix.components.util.PojoSupport |
|---|
logger |
| Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle |
|---|
currentState, INITIALIZED, listener |
| Fields inherited from interface javax.jbi.management.LifeCycleMBean |
|---|
SHUTDOWN, STARTED, STOPPED, UNKNOWN |
| Constructor Summary | |
|---|---|
protected |
ComponentSupport()
|
protected |
ComponentSupport(QName service,
String endpoint)
|
| Method Summary | |
|---|---|
protected javax.jbi.component.ComponentLifeCycle |
createComponentLifeCycle()
|
javax.jbi.messaging.InOnly |
createInOnlyExchange(javax.jbi.messaging.MessageExchange srcExchange)
Creates an InOnly exchange and propagates the correlation id from the given exchange to the newly created exchange |
javax.jbi.messaging.InOnly |
createInOnlyExchange(QName service,
QName interfaceName,
QName operation)
Creates a new InOnly exchange for the given service, interface and/or operation (any of which can be null). |
javax.jbi.messaging.InOnly |
createInOnlyExchange(QName service,
QName interfaceName,
QName operation,
javax.jbi.messaging.MessageExchange beforeExchange)
|
javax.jbi.messaging.InOptionalOut |
createInOptionalOutExchange(javax.jbi.messaging.MessageExchange srcExchange)
Creates an InOptionalOut exchange and propagates the correlation id from the given exchange to the newly created exchange |
javax.jbi.messaging.InOut |
createInOutExchange(javax.jbi.messaging.MessageExchange srcExchange)
Creates an InOut exchange and propagates the correlation id from the given exchange to the newly created exchange |
javax.jbi.messaging.InOut |
createInOutExchange(QName service,
QName interfaceName,
QName operation)
Creates a new InOut exchange for the given service, interface and/or operation (any of which can be null). |
javax.jbi.messaging.RobustInOnly |
createRobustInOnlyExchange(javax.jbi.messaging.MessageExchange srcExchange)
Creates an RobustInOnly exchange and propagates the correlation id from the given exchange to the newly created exchange |
protected javax.jbi.component.ServiceUnitManager |
createServiceUnitManager()
|
javax.jbi.messaging.InOut |
creatInOutExchange(QName service,
QName interfaceName,
QName operation,
javax.jbi.messaging.MessageExchange srcExchange)
|
protected void |
forwardToExchange(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.InOnly outExchange,
javax.jbi.messaging.NormalizedMessage in)
|
protected void |
forwardToExchange(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.InOnly outExchange,
javax.jbi.messaging.NormalizedMessage in,
QName operationName)
|
protected javax.jbi.messaging.NormalizedMessage |
getInMessage(javax.jbi.messaging.MessageExchange exchange)
Returns the in message or throws an exception if there is no in message. |
javax.jbi.component.ComponentLifeCycle |
getLifeCycle()
|
MessageTransformer |
getMessageTransformer()
|
Document |
getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint. |
javax.jbi.component.ServiceUnitManager |
getServiceUnitManager()
|
protected void |
initializeServiceUnitManager()
|
void |
invoke(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
QName service,
QName interfaceName,
QName operation)
Performs an invocation where the service, operation or interface name could be specified |
boolean |
isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
javax.jbi.messaging.MessageExchange exchange)
This method is called by JBI to check if this component, in the role of provider of the service indicated by the given exchange, can actually perform the operation desired. |
boolean |
isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
javax.jbi.messaging.MessageExchange exchange)
This method is called by JBI to check if this component, in the role of consumer of the service indicated by the given exchange, can actually interact with the provider properly. |
void |
propagateCorrelationId(javax.jbi.messaging.MessageExchange source,
javax.jbi.messaging.MessageExchange dest)
Propagates the correlation id from an exchange to a newly created exchange |
javax.jbi.servicedesc.ServiceEndpoint |
resolveEndpointReference(DocumentFragment fragment)
|
void |
setMessageTransformer(MessageTransformer transformer)
|
| Methods inherited from class org.apache.servicemix.components.util.PojoSupport |
|---|
answer, done, fail, fail, getBody, getContext, getDeliveryChannel, getDescription, getEndpoint, getExchangeFactory, getExtensionMBeanName, getService, init, init, isInAndOut, send, sendSync, sendSync, setBody, setEndpoint, setExtensionMBeanName, setService, shutDown |
| Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle |
|---|
firePropertyChanged, getAttributeInfos, getCurrentState, getName, getObjectToManage, getOperationInfos, getSubType, getType, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jbi.component.ComponentLifeCycle |
|---|
start, stop |
| Constructor Detail |
|---|
protected ComponentSupport()
protected ComponentSupport(QName service,
String endpoint)
| Method Detail |
|---|
public javax.jbi.component.ComponentLifeCycle getLifeCycle()
getLifeCycle in interface javax.jbi.component.Componentpublic javax.jbi.component.ServiceUnitManager getServiceUnitManager()
getServiceUnitManager in interface javax.jbi.component.Componentpublic javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(DocumentFragment fragment)
resolveEndpointReference in interface javax.jbi.component.Componentfragment -
public Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint)
getServiceDescription in interface javax.jbi.component.Componentendpoint - the service endpoint.
public boolean isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
javax.jbi.messaging.MessageExchange exchange)
isExchangeWithConsumerOkay in interface javax.jbi.component.Componentendpoint - the endpoint to be used by the consumer; must be
non-null.exchange - the proposed message exchange to be performed; must be
non-null.
true if this provider component can perform the
given exchange with the described consumer.
public boolean isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
javax.jbi.messaging.MessageExchange exchange)
isExchangeWithProviderOkay in interface javax.jbi.component.Componentendpoint - the endpoint to be used by the provider; must be
non-null.exchange - the proposed message exchange to be performed; must be
non-null.
true if this consumer component can interact with
the described provider to perform the given exchange.protected void initializeServiceUnitManager()
protected javax.jbi.component.ServiceUnitManager createServiceUnitManager()
protected javax.jbi.component.ComponentLifeCycle createComponentLifeCycle()
protected javax.jbi.messaging.NormalizedMessage getInMessage(javax.jbi.messaging.MessageExchange exchange)
throws NoInMessageAvailableException
NoInMessageAvailableExceptionpublic MessageTransformer getMessageTransformer()
public void setMessageTransformer(MessageTransformer transformer)
public void invoke(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
QName service,
QName interfaceName,
QName operation)
throws javax.jbi.messaging.MessagingException
exchange - in - service - interfaceName - operation -
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOnly createInOnlyExchange(QName service,
QName interfaceName,
QName operation)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOnly createInOnlyExchange(QName service,
QName interfaceName,
QName operation,
javax.jbi.messaging.MessageExchange beforeExchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOut createInOutExchange(QName service,
QName interfaceName,
QName operation)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOut creatInOutExchange(QName service,
QName interfaceName,
QName operation,
javax.jbi.messaging.MessageExchange srcExchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOnly createInOnlyExchange(javax.jbi.messaging.MessageExchange srcExchange)
throws javax.jbi.messaging.MessagingException
srcExchange -
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOptionalOut createInOptionalOutExchange(javax.jbi.messaging.MessageExchange srcExchange)
throws javax.jbi.messaging.MessagingException
srcExchange -
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.InOut createInOutExchange(javax.jbi.messaging.MessageExchange srcExchange)
throws javax.jbi.messaging.MessagingException
srcExchange -
javax.jbi.messaging.MessagingException
public javax.jbi.messaging.RobustInOnly createRobustInOnlyExchange(javax.jbi.messaging.MessageExchange srcExchange)
throws javax.jbi.messaging.MessagingException
srcExchange -
javax.jbi.messaging.MessagingException
public void propagateCorrelationId(javax.jbi.messaging.MessageExchange source,
javax.jbi.messaging.MessageExchange dest)
source - Exchange which already existsdest - Newly created exchange which should get the correlation id
protected void forwardToExchange(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.InOnly outExchange,
javax.jbi.messaging.NormalizedMessage in,
QName operationName)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
protected void forwardToExchange(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.InOnly outExchange,
javax.jbi.messaging.NormalizedMessage in)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||