de.malowa.state
Class State

java.lang.Object
  extended by de.malowa.state.State
Direct Known Subclasses:
BlockBeforeGreylistState, NotOnGreylistState, OnGreylistState, OnWhitelistState, PassBeforeGreylistState

public abstract class State
extends java.lang.Object

Abstract class for representing a greylisting state. A tupel consisting of recipient, sender and client IP can be in one of the concrete states. A State is part of a VisitorPattern. See StateVisitor


Constructor Summary
State(SMTPInformation info)
          Constructs a state of a provided tupel.
 
Method Summary
abstract  void accept(StateVisitor visitor)
          Part of VisitorPattern.
 SMTPInformation getSMTPInformation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

State

public State(SMTPInformation info)
Constructs a state of a provided tupel.

Parameters:
info - the information of SMTP dialog, containing also the tupel
Method Detail

accept

public abstract void accept(StateVisitor visitor)
Part of VisitorPattern. Must be implemented in concrete class according to VisitorPattern. It calls the appropriate handle-method of the visitor based on the concrete state.

Parameters:
visitor - the visitor containing the callback functions

getSMTPInformation

public SMTPInformation getSMTPInformation()
Returns:
the information of SMTP dialog