public static class ValidatorBase.ResponseValidatorWrapper extends Object implements IValidator
Modifier and Type | Field and Description |
---|---|
protected ValidatorBase |
owner |
Constructor and Description |
---|
ResponseValidatorWrapper(ValidatorBase owner) |
Modifier and Type | Method and Description |
---|---|
void |
configure()
|
boolean |
consumesSessionVariable(String sessionKey)
returns
true if the pipe or one of its children use the named session variable. |
PipeRunResult |
doPipe(Message message,
PipeLineSession session)
This is where the action takes place.
|
org.springframework.context.ApplicationContext |
getApplicationContext() |
ClassLoader |
getConfigurationClassLoader()
This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.
|
Map<String,PipeForward> |
getForwards()
Get pipe forwards.
|
int |
getMaxThreads()
Indicates the maximum number of threads that may call
doPipe() simultaneously. |
void |
registerForward(PipeForward forward)
Register a PipeForward object to this Pipe.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
start()
Perform necessary action to start the pipe.
|
void |
stop()
Perform necessary actions to stop the
Pipe .For instance, closing JMS connections, DBMS connections etc. |
PipeRunResult |
validate(Message message,
PipeLineSession session,
String messageRoot) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setName
getName
getName
getName
protected ValidatorBase owner
public ResponseValidatorWrapper(ValidatorBase owner)
public void configure() throws ConfigurationException
IPipe
configure()
is called once after the PipeLine
is registered
at the Adapter
. Purpose of this method is to reduce
creating connections to databases etc. in the doPipe()
method.
As much as possible class-instantiating should take place in the
configure()
method, to improve performance.configure
in interface IConfigurable
configure
in interface IPipe
ConfigurationException
public PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
IPipe
FixedResultPipe
, the Pipe
can schedule the input to be closed at session exit, by calling Message.closeOnCloseOf(PipeLineSession, String)
This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open
until the message was consumed. Doing so avoids connections leaking from pools, while it enables
efficient streaming processing of data while it is being read from a stream.doPipe
in interface IPipe
PipeRunException
public PipeRunResult validate(Message message, PipeLineSession session, String messageRoot) throws PipeRunException
validate
in interface IValidator
PipeRunException
public int getMaxThreads()
IPipe
doPipe()
simultaneously.
A value of 0 indicates an unlimited number of threads.
Pipe implementations that are not thread-safe, i.e. where doPipe()
may only be
called by one thread at a time, should make sure getMaxThreads always returns a value of 1.getMaxThreads
in interface IPipe
public Map<String,PipeForward> getForwards()
IPipe
getForwards
in interface IPipe
public void registerForward(PipeForward forward)
IPipe
registerForward
in interface IPipe
PipeLine
,
PipeForward
public void start() throws PipeStartException
IPipe
IPipe.configure()
method, for each start and stop command of the
adapter.start
in interface IPipe
PipeStartException
public void stop()
IPipe
Pipe
.public org.springframework.context.ApplicationContext getApplicationContext()
getApplicationContext
in interface IConfigurationAware
public ClassLoader getConfigurationClassLoader()
IScopeProvider
getConfigurationClassLoader
in interface IScopeProvider
ClassLoaderManager
.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public boolean consumesSessionVariable(String sessionKey)
IPipe
true
if the pipe or one of its children use the named session variable.
Callers can use this to determine if a message needs to be preserved.consumesSessionVariable
in interface IPipe
Copyright © 2023 Frank!Framework. All rights reserved.