public abstract class PushingListenerAdapter extends Object implements IPushingListener<Message>, ServiceClient
IPushingListener
that enables a Receiver
to receive messages from Servlets.
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log |
Constructor and Description |
---|
PushingListenerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
afterMessageProcessed(PipeLineResult processResult,
Object rawMessageOrWrapper,
Map<String,Object> threadContext)
Called to perform actions (like committing or sending a reply) after a message has been processed by the
Pipeline.
|
void |
close()
Close all resources used for listening.
|
void |
configure()
initialize listener and register
this to the JNDI |
Message |
extractMessage(Message rawMessage,
Map<String,Object> threadContext)
Extracts string from message obtained from
IPullingListener.getRawMessage(Map) . |
String |
getIdFromRawMessage(Message rawMessage,
Map<String,Object> threadContext)
Extracts ID-string from message obtained from
IPullingListener.getRawMessage(Map) . |
void |
open()
Prepares the listener for receiving messages.
|
Message |
processRequest(Message rawMessage,
PipeLineSession session) |
void |
setApplicationFaultsAsExceptions(boolean b) |
void |
setExceptionListener(IbisExceptionListener exceptionListener)
Set a (single) listener that will be notified of any exceptions.
|
void |
setHandler(IMessageHandler<Message> handler)
Set the handler that will do the processing of the message.
|
void |
setName(String name)
Name of the listener as known to the adapter
|
void |
setRunning(boolean running) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getApplicationContext, getName
getConfigurationClassLoader
public void configure() throws ConfigurationException
this
to the JNDIconfigure
in interface IConfigurable
configure
in interface IListener<Message>
ConfigurationException
public void open() throws ListenerException
IListener
open()
is called once each time the listener is started.open
in interface IListener<Message>
ListenerException
public void close()
IListener
public String getIdFromRawMessage(Message rawMessage, Map<String,Object> threadContext)
IListener
IPullingListener.getRawMessage(Map)
. May also extract
other parameters from the message and put those in the context.
getIdFromRawMessage
in interface IListener<Message>
public Message extractMessage(Message rawMessage, Map<String,Object> threadContext)
IListener
IPullingListener.getRawMessage(Map)
. May also extract
other parameters from the message and put those in the threadContext.extractMessage
in interface IListener<Message>
public void afterMessageProcessed(PipeLineResult processResult, Object rawMessageOrWrapper, Map<String,Object> threadContext) throws ListenerException
IListener
afterMessageProcessed
in interface IListener<Message>
ListenerException
public Message processRequest(Message rawMessage, PipeLineSession session) throws ListenerException
processRequest
in interface ServiceClient
ListenerException
public void setName(String name)
setName
in interface INamedObject
public void setHandler(IMessageHandler<Message> handler)
IPushingListener
setHandler
in interface IPushingListener<Message>
public void setExceptionListener(IbisExceptionListener exceptionListener)
IPushingListener
setExceptionListener
in interface IPushingListener<Message>
public void setApplicationFaultsAsExceptions(boolean b)
@Protected public void setRunning(boolean running)
Copyright © 2023 Frank!Framework. All rights reserved.