@ElementType(value=SESSION) public class PutSystemDateInSession extends FixedForwardPipe
pipeLineSession
.Modifier and Type | Field and Description |
---|---|
static String |
FIXEDDATE_STUB4TESTTOOL_KEY |
static String |
FIXEDDATETIME |
static String |
FORMAT_FIXEDDATETIME |
static Object |
OBJECT |
parameterNamesMustBeUnique
log
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
Constructor and Description |
---|
PutSystemDateInSession() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
Checks whether the proper forward is defined, a dateFormat is specified and the dateFormat is valid.
|
PipeRunResult |
doPipe(Message message,
PipeLineSession session)
This is where the action takes place.
|
String |
getDateFormat() |
String |
getSessionKey() |
boolean |
isGetCurrentTimeStampInMillis() |
boolean |
isReturnFixedDate() |
void |
setDateFormat(String rhs)
Format to store date in
|
void |
setGetCurrentTimeStampInMillis(boolean getCurrentTimeStampInMillis)
If set to 'true' then current time stamp in millisecond will be stored in the sessionKey
|
void |
setReturnFixedDate(boolean b)
If
true , the date/time returned will always be "2001-12-17 09:30:47" (for testing purposes only). |
void |
setSessionKey(String newSessionKey)
Key of session variable to store systemdate in
|
void |
setSleepWhenEqualToPrevious(long sleepWhenEqualToPrevious)
Set to a time in milliseconds to create a value that is different to the previous returned value by a PutSystemDateInSession pipe in
this virtual machine or
-1 to disable . |
void |
setTimeZone(String timeZone)
Time zone to use for the formatter
|
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getInSizeStatDummyObject, getOutSizeStatDummyObject, getParameterList, hasSizeStatistics, registerEvent, registerForward, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, start, stop, throwEvent
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getLocker, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
getMaxThreads
getName
getApplicationContext, getName
getConfigurationClassLoader
getName
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
public static final Object OBJECT
public static final String FIXEDDATETIME
public static final String FORMAT_FIXEDDATETIME
public static final String FIXEDDATE_STUB4TESTTOOL_KEY
public void configure() throws ConfigurationException
configure
in interface IConfigurable
configure
in interface IPipe
configure
in class FixedForwardPipe
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.PipeRunException
public void setSessionKey(String newSessionKey)
public String getSessionKey()
public void setDateFormat(String rhs)
public String getDateFormat()
public void setTimeZone(String timeZone)
public void setSleepWhenEqualToPrevious(long sleepWhenEqualToPrevious)
-1 to disable
. The thread will sleep for the specified time before recalculating a new value. Set the
timezone to a value without Daylight Saving Time (like GMT+1) to prevent this pipe to generate two equal value's when the clock is set back.
note: When you're looking for a GUID parameter for your XSLT it might be better to use
<param name="guid" pattern="{hostname}_{uid}"/>, see Parameter
.public void setReturnFixedDate(boolean b)
true
, the date/time returned will always be "2001-12-17 09:30:47" (for testing purposes only). It is overridden by the value of the pipelinesession key stub4testtool.fixeddate
when it existspublic boolean isReturnFixedDate()
public void setGetCurrentTimeStampInMillis(boolean getCurrentTimeStampInMillis)
public boolean isGetCurrentTimeStampInMillis()
Copyright © 2023 Frank!Framework. All rights reserved.