Package org.cometd.server.authorizer
Class GrantAuthorizer
- java.lang.Object
-
- org.cometd.server.authorizer.GrantAuthorizer
-
- All Implemented Interfaces:
Authorizer
public class GrantAuthorizer extends Object implements 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
Authorizer.Operation, Authorizer.Result
-
-
Field Summary
Fields Modifier and Type Field Description static GrantAuthorizer
GRANT_ALL
GrantsAuthorizer.Operation.CREATE
,Authorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorizationstatic GrantAuthorizer
GRANT_CREATE
GrantsAuthorizer.Operation.CREATE
authorizationstatic GrantAuthorizer
GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATE
andAuthorizer.Operation.SUBSCRIBE
authorizationstatic GrantAuthorizer
GRANT_NONE
Grants no authorization, the authorization request is ignoredstatic GrantAuthorizer
GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISH
authorizationstatic GrantAuthorizer
GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBE
authorizationstatic GrantAuthorizer
GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authorizer.Result
authorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
Blocking version ofAuthorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise)
.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cometd.bayeux.server.Authorizer
authorize
-
-
-
-
Field Detail
-
GRANT_CREATE
public static final GrantAuthorizer GRANT_CREATE
GrantsAuthorizer.Operation.CREATE
authorization
-
GRANT_SUBSCRIBE
public static final GrantAuthorizer GRANT_SUBSCRIBE
GrantsAuthorizer.Operation.SUBSCRIBE
authorization
-
GRANT_PUBLISH
public static final GrantAuthorizer GRANT_PUBLISH
GrantsAuthorizer.Operation.PUBLISH
authorization
-
GRANT_CREATE_SUBSCRIBE
public static final GrantAuthorizer GRANT_CREATE_SUBSCRIBE
GrantsAuthorizer.Operation.CREATE
andAuthorizer.Operation.SUBSCRIBE
authorization
-
GRANT_SUBSCRIBE_PUBLISH
public static final GrantAuthorizer GRANT_SUBSCRIBE_PUBLISH
GrantsAuthorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization
-
GRANT_ALL
public static final GrantAuthorizer GRANT_ALL
GrantsAuthorizer.Operation.CREATE
,Authorizer.Operation.SUBSCRIBE
andAuthorizer.Operation.PUBLISH
authorization
-
GRANT_NONE
public static final GrantAuthorizer GRANT_NONE
Grants no authorization, the authorization request is ignored
-
-
Method Detail
-
authorize
public Authorizer.Result authorize(Authorizer.Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
Description copied from interface:Authorizer
Blocking version of
Authorizer.authorize(Operation, ChannelId, ServerSession, ServerMessage, Promise)
.- Specified by:
authorize
in interfaceAuthorizer
- Parameters:
operation
- the operation to authorizechannel
- the channel for which the authorization has been requestedsession
- the session that is requesting the authorizationmessage
- the message that triggered the authorization request- Returns:
- the authorization result
-
-