Package de.quantummaid.eventmaid.channel
Class ChannelProcessingFrame<T>
- java.lang.Object
-
- de.quantummaid.eventmaid.channel.ChannelProcessingFrame<T>
-
- Type Parameters:
T- the type of messages of theChannel
public final class ChannelProcessingFrame<T> extends Object
TheProcessingContextobject stores the history of the traversedChannelsin form of a linked list ofChannelProcessingFrames. For eachChanneloneChannelProcessingFrameis added to the end of the list.Each
ProcessingContextstores the correspondingChannel, theActionthat was executed as well as its preceding and succeeding frame. In case of the first frame in the list, theChannelProcessingFrame.getPreviousFrame()returns null. Respective for the last frame theChannelProcessingFrame#getNextFrame() ChannelStatistics.getNextFrame()returns null.- See Also:
- EventMaid Documentation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelProcessingFrame<T>copy()Creates a exact shallow copy of the currentChannelProcessingFrame.Action<T>getAction()Channel<T>getChannel()ChannelProcessingFrame<T>getNextFrame()ChannelProcessingFrame<T>getPreviousFrame()static <T> ChannelProcessingFrame<T>processingFrame(Channel<T> channel)Factory method to create a newChannelProcessingFrameassociated with the givenChannel.voidsetAction(Action<T> action)voidsetNextFrame(ChannelProcessingFrame<T> nextFrame)voidsetPreviousFrame(ChannelProcessingFrame<T> previousFrame)
-
-
-
Method Detail
-
processingFrame
public static <T> ChannelProcessingFrame<T> processingFrame(Channel<T> channel)
Factory method to create a newChannelProcessingFrameassociated with the givenChannel.- Type Parameters:
T- the type of theChannel- Parameters:
channel- theChannelthis frame relates to- Returns:
- a new
ChannelProcessingFrame
-
copy
public ChannelProcessingFrame<T> copy()
Creates a exact shallow copy of the currentChannelProcessingFrame.- Returns:
- a shallow copy of the current
ChannelProcessingFrame
-
getPreviousFrame
public ChannelProcessingFrame<T> getPreviousFrame()
-
setPreviousFrame
public void setPreviousFrame(ChannelProcessingFrame<T> previousFrame)
-
getNextFrame
public ChannelProcessingFrame<T> getNextFrame()
-
setNextFrame
public void setNextFrame(ChannelProcessingFrame<T> nextFrame)
-
-