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.

@FunctionalInterface public interface NodeConnectionPermissioningProvider
Allows you to register a provider that will decide if a peer connection is permitted.

A simple implementation can look like:
context
   .getService(PermissioningService.class)
   .get()
   .registerNodePermissioningProvider((sourceEnode, destinationEnode) -> {
       // Your logic here
       return true;
    });
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isConnectionPermitted(EnodeURL sourceEnode, EnodeURL destinationEnode)
    Can be used to intercept the initial connection to a peer.
  • Method Details

    • isConnectionPermitted

      boolean isConnectionPermitted(EnodeURL sourceEnode, EnodeURL destinationEnode)
      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 enode
      destinationEnode - the enode you are attempting to connect to
      Returns:
      if the connection is permitted