Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.net.policies
Class BasicAcceptPolicy

java.lang.Object
  extended by com.jivesoftware.forum.net.policies.BasicAcceptPolicy
All Implemented Interfaces:
AcceptPolicy

public class BasicAcceptPolicy
extends java.lang.Object
implements AcceptPolicy

The simplest possible accept policy that either accepts or rejects all connections.


Constructor Summary
BasicAcceptPolicy(boolean alwaysAccept)
          Create a basic accept policy that either accepts or denies all incoming connections.
 
Method Summary
 boolean evaluate(Connection connection)
          Ignores the connection and returns the static result set in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAcceptPolicy

public BasicAcceptPolicy(boolean alwaysAccept)

Create a basic accept policy that either accepts or denies all incoming connections.

Parameters:
alwaysAccept - true if the policy should accept all connections.
Method Detail

evaluate

public boolean evaluate(Connection connection)

Ignores the connection and returns the static result set in the constructor.

Specified by:
evaluate in interface AcceptPolicy
Parameters:
connection - the connection being evaluated by the two policies.
Returns:
always the same as the value set in the constructor.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.