Interface NodeConnectionPermissioningProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Allows you to register a provider that will decide if a peer connection is permitted.
A simple implementation can look like:
A simple implementation can look like:
context
.getService(PermissioningService.class)
.get()
.registerNodePermissioningProvider((sourceEnode, destinationEnode) -> {
// Your logic here
return true;
});
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisConnectionPermitted(EnodeURL sourceEnode, EnodeURL destinationEnode) Can be used to intercept the initial connection to a peer.
-
Method Details
-
isConnectionPermitted
Can be used to intercept the initial connection to a peer. Note that once a connection is established it's bidirectional.- Parameters:
sourceEnode- the originator's enodedestinationEnode- the enode you are attempting to connect to- Returns:
- if the connection is permitted
-