de.malowa.state
Interface StateVisitor

All Known Implementing Classes:
ClientTask, Greylister

public interface StateVisitor

The StateVisitor is a part of a VisitorPattern and offers callback functions which will be called from the State.accept(StateVisitor) method.

Author:
Marcel Lohmann

Method Summary
 void handleBlockBeforeGreylist(BlockBeforeGreylistState visitee)
          Callback function when the delivery attempt should be rejected as it is on a calculated blacklist.
 void handleNotOnGreylist(NotOnGreylistState visitee)
          Callback function when the delivery attempt should be deferred as it has not been seen before.
 void handleOnWhitelist(OnWhitelistState visitee)
          Callback function when the delivery attempt should be accepted as it is on the internal whitelist.
 void handlePassBeforeGreylist(PassBeforeGreylistState visitee)
          Callback function when the delivery attempt should be accepted as it is on a calculated whitelist.
 void handlePassedGreylist(PassedGreylistState visitee)
          Callback function when the delivery attempt should be accepted as it has passed the greylisting.
 void handlePassWhileGreylisted(PassWhileGreylistedState visitee)
          Callback function when the delivery attempt should be accepted as it is on a calculated whitelist.
 void handleStillDelayed(StillDelayedState visitee)
          Callback function when the delivery attempt should be deferred again as its delay time has not passed, yet.
 

Method Detail

handleOnWhitelist

void handleOnWhitelist(OnWhitelistState visitee)
Callback function when the delivery attempt should be accepted as it is on the internal whitelist.

Parameters:
visitee - the state contains all information of the delivery attempt.

handlePassedGreylist

void handlePassedGreylist(PassedGreylistState visitee)
Callback function when the delivery attempt should be accepted as it has passed the greylisting. In other words the delay time has passed.

Parameters:
visitee - the state contains all information of the delivery attempt.

handleNotOnGreylist

void handleNotOnGreylist(NotOnGreylistState visitee)
Callback function when the delivery attempt should be deferred as it has not been seen before. The attempt will be documented for ongoing delivery attempts.

Parameters:
visitee - the state contains all information of the delivery attempt.

handleStillDelayed

void handleStillDelayed(StillDelayedState visitee)
Callback function when the delivery attempt should be deferred again as its delay time has not passed, yet.

Parameters:
visitee - the state contains all information of the delivery attempt.

handlePassBeforeGreylist

void handlePassBeforeGreylist(PassBeforeGreylistState visitee)
Callback function when the delivery attempt should be accepted as it is on a calculated whitelist. That means that the delivery attempt should not be delayed at all and must not pass greylisting.

Parameters:
visitee - the state contains all information of the delivery attempt.

handlePassWhileGreylisted

void handlePassWhileGreylisted(PassWhileGreylistedState visitee)
Callback function when the delivery attempt should be accepted as it is on a calculated whitelist. That means that the delay time has not been passed but other indications show that it would pass in the future.

Parameters:
visitee - the state contains all information of the delivery attempt.

handleBlockBeforeGreylist

void handleBlockBeforeGreylist(BlockBeforeGreylistState visitee)
Callback function when the delivery attempt should be rejected as it is on a calculated blacklist. That means that there are strong indications that the delivery attempt originates from a spamming source.

Parameters:
visitee - the state contains all information of the delivery attempt.