|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.netcomm.rules.ConnectionRules
public final class ConnectionRules
Contains a set of rules to accept, reject or refuse incomming connections. WarnningThe Default Rule accepts all incomming connections. Warnning If madkit.netcomm.rules is defined, the rules will be loaded from the file and all parameters will be disregarded.
Constructor Summary | |
---|---|
ConnectionRules()
Creates a new ConnectionRule with an empty rule set and Rule.ACCEPT as the default action |
|
ConnectionRules(java.util.Collection rules)
Creates a new ConnectionRule with rules as the rule set and Rule.ACCEPT as the default action |
|
ConnectionRules(int action,
java.lang.Object arg)
Creates a new ConnectionRule with an empty rule set and action as the default action |
|
ConnectionRules(int action,
java.lang.Object arg,
java.util.Collection rules)
Creates a new Connectionrule with action as the default's rule action,
and rules as the rules set. |
Method Summary | |
---|---|
Rule |
getDefaultConnectionRule()
gets the Default connection rule. |
static ConnectionRules |
getInstance()
|
Rule |
getRule(java.lang.String host)
Finds the firts rule that matches host . |
void |
printRules()
|
void |
setDefaultConnectionRuleAction(int action,
java.lang.Object arg)
Sets the action for the default action rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionRules()
public ConnectionRules(int action, java.lang.Object arg)
action
as the default action
action
- arg
- public ConnectionRules(java.util.Collection rules)
rules
as the rule set and Rule.ACCEPT as the default action
rules
- public ConnectionRules(int action, java.lang.Object arg, java.util.Collection rules)
action
as the default's rule action,
and rules
as the rules set.
action
- default actionarg
- default rule argumentrules
- rules set.Method Detail |
---|
public void setDefaultConnectionRuleAction(int action, java.lang.Object arg)
action
- actionarg
- argument.public Rule getDefaultConnectionRule()
public Rule getRule(java.lang.String host)
host
. If no rule is found, the defualt
rule is returned.
host
-
public static ConnectionRules getInstance()
public void printRules()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |