Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.multiServer
Interface ActKeyValidation  view ActKeyValidation download ActKeyValidation.java


public interface ActKeyValidation

This interface is provided so that some sort of key checking or validation on the right-to-run of a servlet is performed. Note that this isn't the most secure implementation of this schema; as the wily hacker who is trying to circumvent checking can just compile up their own version of whatever calls instantiations of this interface and put it before the original one in the classpath. This class can also be used as an initializer for a check or a set of checks that will be called in the performance of an application to see what level of survice the runner of the application has subscribed to. For instance, if the following class if defined:

 class Checkpoint implements com.lutris.multiServer.ActKeyValidation {
    ...
    boolean hasMinimalServiceContract() ...
    boolean hasExpensiveServiceContract() ...
 }
 
Then other portions of the application can just call into that class's hasMinimalServiceContract and hasExpensiveServiceContract methods to find out if extra-charge portions of the application are allowed to run.


Method Summary
 void validate(com.lutris.util.Config config, com.lutris.logging.LogChannel logChannel)
          Classes of this instance will only be instanciated and then have this one function called to validate the currently running servlet's right-to-run.
 

Method Detail

validate

public void validate(com.lutris.util.Config config,
                     com.lutris.logging.LogChannel logChannel)
              throws ActKeyValidationException
Classes of this instance will only be instanciated and then have this one function called to validate the currently running servlet's right-to-run. If the validation routine is to do anything short of halting the servlet then it should not throw an exception.