@FrankDocGroup(order=10, name="Pipes") public interface IPipe extends IConfigurable, IForwardTarget
PipeLine
.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.
|
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 |
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. |
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getName
void configure() throws ConfigurationException
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
ConfigurationException
PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
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.PipeRunException
int getMaxThreads()
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.Map<String,PipeForward> getForwards()
void registerForward(PipeForward forward) throws ConfigurationException
ConfigurationException
- If the forward target cannot be registered.PipeLine
,
PipeForward
void start() throws PipeStartException
configure()
method, for each start and stop command of the
adapter.PipeStartException
void stop()
Pipe
.boolean consumesSessionVariable(String sessionKey)
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.Copyright © 2023 Frank!Framework. All rights reserved.