Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-375

Allow service requests to a connector to be prohibited based on a predicate defined on connections.

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 5.1.0.Final
    • 5.0.20.Final
    • None

    Description

      Generally speaking, Remoting services are defined on endpoints in the following way by specifying a channel name and an OpenListener:

              try {
                  registration = endpoint.registerService(CHANNEL_NAME, channelOpenListener, this.channelCreationOptions);
              } catch (ServiceRegistrationException e) {
                  throw new StartException(e);
              }
      

      Once the service has been registered, it can in general be used atop any connection from the client to any Remoting connector by calling from the client:

              IoFuture<Channel> futureChannel = connection.openChannel(CHANNEL_NAME, OptionMap.EMPTY);
      

      Sometimes we want to restrict the connectors that services can be created on.

      We want to introduce a version of registerService which allows being able to restrict the set of connectors we may use the service on, by way of a validation predicate on the Connection:

            Predicate<Connection> validationPredicate = {some predicate defined in terms of connection instance}
              try {
                  registration = endpoint.registerService(CHANNEL_NAME, channelOpenListener, this.channelCreationOptions, validationPredicate);
              } catch (ServiceRegistrationException e) {
                  throw new StartException(e);
              }
      

      For example, we may wish prevent service requests atop of a connection on the connector listening on port 1234.

      When we try to create a service Channel on a connection for which the validationPredicate evaluates to false, the connection is refused and the client receives a ServiceOpenException with message "Service refused".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: