|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NodeValidator
Validate peers and their claimed capabilities
The implementations of NodeValidator handle the verification that we
know the node(s) when they connect, and calculate the resulting
capabilities/roles we allow the nodes.
If you do not provide the Node instance a node validator instance then
the node instance will use a DefaultNodeValidator.
Implementations can implement a "peer list" using plain-text files, databases, etc.
| Nested Class Summary | |
|---|---|
static class |
NodeValidator.AuthenticationResult
|
| Method Summary | |
|---|---|
NodeValidator.AuthenticationResult |
authenticateNode(String host_id,
Object obj)
Verify that we know the node. |
Capability |
authorizeNode(String host_id,
NodeSettings settings,
Capability reported_capabilities)
Calculate the capabilities that we allow the peer to have. |
| Method Detail |
|---|
NodeValidator.AuthenticationResult authenticateNode(String host_id,
Object obj)
NodeValidator.AuthenticationResult
telling the node if we know the peer, and if not what the
result-code and error-message should be. (Node provides reasonable defaults).
host_id - The orogin-host-id of the peer.obj - An object describing the transport connection. For TCP transport connections this is a socket channel. For SCTP transport connections it is a RelevantSCTPAuthInfo instance.
Capability authorizeNode(String host_id,
NodeSettings settings,
Capability reported_capabilities)
host_id - The origin-host-id of the peer.settings - The settings of the node (as passed to its constructor)reported_capabilities - The capability set the peer reported it supports.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||