com.sun.enterprise.web.connector.grizzly
Interface Rule<E>

All Superinterfaces:
Callable
All Known Implementing Classes:
HeapMemoryRule, PathRule, ThreadRatioRule

public interface Rule<E>
extends Callable

A rule is used to define operations, and can be executed by invoking call directly or using any objects that supports the Callable interface. The rule can always be cancelled based on its Futore.

Author:
Jeanfrancois Arcand

Method Summary
 void attach(E o)
          Attach a E to this rule.
 E attachement()
          Return the current attachement
 void cancel()
          Cancel execution of this rule.
 int getExecutionTime()
          Return the time in second before this rule will be executed.
 void setExecutionTime(int time)
          Set the interval in seconds to wait before executing this rule.
 void setFuture(Future future)
          Set the Future associated with this execution of this rule.
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Method Detail

attach

void attach(E o)
Attach a E to this rule.


attachement

E attachement()
Return the current attachement


cancel

void cancel()
Cancel execution of this rule.


setFuture

void setFuture(Future future)
Set the Future associated with this execution of this rule.


setExecutionTime

void setExecutionTime(int time)
Set the interval in seconds to wait before executing this rule.


getExecutionTime

int getExecutionTime()
Return the time in second before this rule will be executed.



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.