com.bigdata.jini.start.config
Class AbstractHostConstraint
java.lang.Object
com.bigdata.jini.start.config.AbstractHostConstraint
- All Implemented Interfaces:
- IServiceConstraint, Serializable
- Direct Known Subclasses:
- HostAllowConstraint, HostRejectConstraint
public abstract class AbstractHostConstraint
- extends Object
- implements IServiceConstraint
Core impl.
- Version:
- $Id$
- Author:
- Bryan Thompson
- See Also:
- Serialized Form
- TODO:
- do a variant based on
InetAddress. This might allow the direct
specification of a subnet.
|
Field Summary |
protected static boolean |
DEBUG
|
protected String[] |
hosts
|
protected static boolean |
INFO
|
protected static org.apache.log4j.Logger |
log
|
log
protected static final org.apache.log4j.Logger log
INFO
protected static final boolean INFO
DEBUG
protected static final boolean DEBUG
hosts
protected final String[] hosts
AbstractHostConstraint
public AbstractHostConstraint(String host)
throws UnknownHostException
- Throws:
UnknownHostException
AbstractHostConstraint
public AbstractHostConstraint(String[] hosts)
throws UnknownHostException
- Throws:
UnknownHostException
toString
public String toString()
- Overrides:
toString in class Object
allow
protected boolean allow(boolean accept)
isLocalHost
public static final boolean isLocalHost(String hostname)
throws UnknownHostException
- Return
true if hostname is a name for the local
host.
- Parameters:
hostname - A host name.
- Throws:
UnknownHostException
allow
public abstract boolean allow()
allow
public boolean allow(JiniFederation ignored)
- Description copied from interface:
IServiceConstraint
- Return
true iff a service may be instantiated on this
host.
Note: Constraints which can be evaluated without the federation reference
MUST NOT throw an exception if that reference is null.
This allows us to evaluate constraints for boostrap services as well as
for ManagedServiceConfigurations
- Specified by:
allow in interface IServiceConstraint
- Parameters:
ignored - The federation.
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.