eu.xtreemos.xosd.utilities.logger.filters
Interface ITokenFilter

All Known Implementing Classes:
BlockingTokenFilter, ContainsFilter, NonBlockingTokenFilter, TimeMachine

public interface ITokenFilter

the most simple element of filtering system. accepts elements, processes them and store them into output queue one can use the output queue as the input to another filer element possible actions: - add element - clear output queue - get top element - get num of elements - filters register

Author:
uros

Method Summary
 void add(IToken token)
          processes the token and stores it in its proper place in the pipelane
 void clearPipe()
          removes all elements in the pipe
 TokenScatterUnit filters()
          returns unit for filter management
 boolean isFinal()
          checks if the filter is final or just one in a chain
 void markLastToken()
          marks the flag, that the last token has been sent to the filter. this matters if the filter is a blocking filter, which needs all tokens before proceeding (blocking filters can be used for sorting elements).
 int numTokens()
           
 IToken topToken()
          Returns first elemen of the pipe, but only if there are no filters registered to use them. this function works only for final filters.
 

Method Detail

add

void add(IToken token)
processes the token and stores it in its proper place in the pipelane

Parameters:
token -

markLastToken

void markLastToken()
marks the flag, that the last token has been sent to the filter. this matters if the filter is a blocking filter, which needs all tokens before proceeding (blocking filters can be used for sorting elements).


clearPipe

void clearPipe()
removes all elements in the pipe


topToken

IToken topToken()
Returns first elemen of the pipe, but only if there are no filters registered to use them. this function works only for final filters.

Returns:
remove the first element from the pipe and return it

numTokens

int numTokens()

filters

TokenScatterUnit filters()
returns unit for filter management

Returns:

isFinal

boolean isFinal()
checks if the filter is final or just one in a chain

Returns: