Class GrantAuthorizer

java.lang.Object
org.cometd.server.authorizer.GrantAuthorizer
All Implemented Interfaces:
org.cometd.bayeux.server.Authorizer

public class GrantAuthorizer
extends java.lang.Object
implements org.cometd.bayeux.server.Authorizer

This Authorizer implementation grants permission for a set of operations defined at construction time.

If the operation does not match, it ignores the authorization request.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.cometd.bayeux.server.Authorizer

    org.cometd.bayeux.server.Authorizer.Operation, org.cometd.bayeux.server.Authorizer.Result
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static GrantAuthorizer GRANT_ALL
    Grants Authorizer.Operation.CREATE, Authorizer.Operation.SUBSCRIBE and Authorizer.Operation.PUBLISH authorization
    static GrantAuthorizer GRANT_CREATE
    Grants Authorizer.Operation.CREATE authorization
    static GrantAuthorizer GRANT_CREATE_SUBSCRIBE
    Grants Authorizer.Operation.CREATE and Authorizer.Operation.SUBSCRIBE authorization
    static GrantAuthorizer GRANT_NONE
    Grants no authorization, the authorization request is ignored
    static GrantAuthorizer GRANT_PUBLISH
    Grants Authorizer.Operation.PUBLISH authorization
    static GrantAuthorizer GRANT_SUBSCRIBE
    Grants Authorizer.Operation.SUBSCRIBE authorization
    static GrantAuthorizer GRANT_SUBSCRIBE_PUBLISH
    Grants Authorizer.Operation.SUBSCRIBE and Authorizer.Operation.PUBLISH authorization
  • Method Summary

    Modifier and Type Method Description
    org.cometd.bayeux.server.Authorizer.Result authorize​(org.cometd.bayeux.server.Authorizer.Operation operation, org.cometd.bayeux.ChannelId channel, org.cometd.bayeux.server.ServerSession session, org.cometd.bayeux.server.ServerMessage message)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Method Details

    • authorize

      public org.cometd.bayeux.server.Authorizer.Result authorize​(org.cometd.bayeux.server.Authorizer.Operation operation, org.cometd.bayeux.ChannelId channel, org.cometd.bayeux.server.ServerSession session, org.cometd.bayeux.server.ServerMessage message)
      Specified by:
      authorize in interface org.cometd.bayeux.server.Authorizer
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object