|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.component.framework.listener.AbstractListener
public abstract class AbstractListener
The abstract methods for a CDK listener. Both external and JBI listener extend it.
| Field Summary | |
|---|---|
protected AbstractComponent |
component
The JBI component itself |
protected javax.jbi.messaging.MessageExchangeFactory |
factory
The messageExchange factory used to create MessageExchanges |
protected MessageInterceptorProcessor |
messageInterceptorProcessor
The message interceptor processor; Each listener have its own interceptor processor in order to get better performances. |
| Constructor Summary | |
|---|---|
AbstractListener()
Creates a new instance of AbstractListener |
|
| Method Summary | |
|---|---|
org.ow2.petals.component.framework.api.message.Exchange |
createConsumeExchange(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
Create a message exchange with all the information set in the specified CONSUME - address (interface, service, endpoint) - MEP - operation - PEtALS exchange' meta-data (org.objectweb.petals.xxx) |
org.ow2.petals.component.framework.api.message.Exchange |
createConsumeExchange(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
org.ow2.petals.component.framework.api.Message.MEPConstants mep)
Create a message exchange with all the information set in the specified CONSUME, with the given exchange pattern - address (interface, service, endpoint) - operation - PEtALS exchange' meta-data (org.objectweb.petals.xxx) |
org.ow2.petals.component.framework.api.message.Exchange |
createExchange(org.ow2.petals.component.framework.api.Message.MEPConstants mep)
Create an exchange implementation matching the given pattern. |
AbstractComponent |
getComponent()
Get the component. |
javax.jbi.component.ComponentContext |
getComponentContext()
Deprecated. |
org.ow2.petals.component.framework.jbidescriptor.generated.Consumes |
getConsumes()
|
javax.transaction.Transaction |
getCurrentTransaction()
Return the current Transaction. |
org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions |
getExtensions()
Get the service extensions. |
java.lang.String |
getInstallRoot()
|
java.util.logging.Logger |
getLogger()
|
MessageInterceptorProcessor |
getMessageInterceptorProcessor()
|
org.ow2.petals.component.framework.jbidescriptor.generated.Provides |
getProvides()
|
void |
init()
A convenience method which can be overridden so that there's no need to call super.init(). |
void |
init(AbstractComponent component)
Initialize the listener. |
protected org.ow2.petals.component.framework.api.Message.MEPConstants |
retrievePattern(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
Retrieve the MEP from the consumer node extensions. |
void |
send(org.ow2.petals.component.framework.api.message.Exchange exchange)
Send a message to the endpoint specified in the MessageExchange in an asynchronous way. Process MessageExchange interceptors before sending message. |
void |
sendAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
AsyncContext asyncContext)
Send a message to the endpoint specified in the MessageExchange in an asynchronous way. |
boolean |
sendSync(org.ow2.petals.component.framework.api.message.Exchange exchange)
Call sendSync(MessageExchage exchange, long timeoutMS) with a timeout value found in provides or consumes extensions or "0" if not found |
boolean |
sendSync(org.ow2.petals.component.framework.api.message.Exchange exchange,
long timeoutMS)
Send a message to the endpoint specified in the MessageExchange in an synchronous way. Process MessageExchange interceptors before sending message. |
void |
setConsumes(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
|
void |
setCurrentTransaction(javax.transaction.Transaction transaction)
|
void |
setExtensions(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
|
void |
setProvides(org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
Set Provides section |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractComponent component
protected javax.jbi.messaging.MessageExchangeFactory factory
protected MessageInterceptorProcessor messageInterceptorProcessor
| Constructor Detail |
|---|
public AbstractListener()
AbstractListener
| Method Detail |
|---|
public org.ow2.petals.component.framework.api.message.Exchange createConsumeExchange(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
throws javax.jbi.messaging.MessagingException,
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
javax.jbi.messaging.MessagingException - The message exchange can't be created or no pattern specified
in extensions
org.ow2.petals.component.framework.api.exception.PEtALSCDKException - The current Transaction has failed to return its status
public org.ow2.petals.component.framework.api.message.Exchange createConsumeExchange(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes,
org.ow2.petals.component.framework.api.Message.MEPConstants mep)
throws javax.jbi.messaging.MessagingException,
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
javax.jbi.messaging.MessagingException - The message exchange can't be created or no pattern specified
in extensions
org.ow2.petals.component.framework.api.exception.PEtALSCDKException - The current Transaction has failed to return its status
public org.ow2.petals.component.framework.api.message.Exchange createExchange(org.ow2.petals.component.framework.api.Message.MEPConstants mep)
throws javax.jbi.messaging.MessagingException,
org.ow2.petals.component.framework.api.exception.PEtALSCDKException
mep - a specific MEP pattern
javax.jbi.messaging.MessagingException - The message exchange can't be created or no pattern specified
in extensions
org.ow2.petals.component.framework.api.exception.PEtALSCDKException - The current Transaction has failed to return its statuspublic AbstractComponent getComponent()
@Deprecated public javax.jbi.component.ComponentContext getComponentContext()
public org.ow2.petals.component.framework.jbidescriptor.generated.Consumes getConsumes()
public javax.transaction.Transaction getCurrentTransaction()
throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
null if no Transaction Manager
is implemented by the JBI container
javax.transaction.SystemException
javax.transaction.NotSupportedException
org.ow2.petals.component.framework.api.exception.PEtALSCDKExceptionpublic org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions getExtensions()
public java.lang.String getInstallRoot()
public java.util.logging.Logger getLogger()
public MessageInterceptorProcessor getMessageInterceptorProcessor()
public org.ow2.petals.component.framework.jbidescriptor.generated.Provides getProvides()
public void init()
public final void init(AbstractComponent component)
component -
public void send(org.ow2.petals.component.framework.api.message.Exchange exchange)
throws javax.jbi.messaging.MessagingException
exchange - message exchange to send; must be non-null
javax.jbi.messaging.MessagingException - if the address has no endpoint associated to it, or if an
error occurs while sending the message through the container
public void sendAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
AsyncContext asyncContext)
throws javax.jbi.messaging.MessagingException
exchange - message exchange to send; must be non-null
javax.jbi.messaging.MessagingException - if the address has no endpoint associated to it, or if an
error occurs while sending the message through the container
public boolean sendSync(org.ow2.petals.component.framework.api.message.Exchange exchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
public boolean sendSync(org.ow2.petals.component.framework.api.message.Exchange exchange,
long timeoutMS)
throws javax.jbi.messaging.MessagingException
exchange - message exchange to send; must be non-nulltimeoutMS - timeout period, in milliseconds (0 means no timeout); must be
greater than or equal to zero
javax.jbi.messaging.MessagingException - if the address has no endpoint associated to it, or if an
error occurs while sending the message through the containerpublic final void setConsumes(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
consumes - the consumes to setpublic final void setCurrentTransaction(javax.transaction.Transaction transaction)
transaction - public final void setExtensions(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
consumes - the consumes to setpublic final void setProvides(org.ow2.petals.component.framework.jbidescriptor.generated.Provides provides)
provides - the provides to set
protected final org.ow2.petals.component.framework.api.Message.MEPConstants retrievePattern(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumes)
throws javax.jbi.messaging.MessagingException
consumes - The consumer node of the SU JBI descriptor.
null if no MEP
pattern specified.
javax.jbi.messaging.MessagingException - MEP pattern specified in consumes extension is not valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||