|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SecurityPolicy
A Bayeux SecurityPolicy defines the authorization constraints that must be enforced by
a BayeuxServer.
A BayeuxServer may deny the handshake from clients that do not have proper
authentication credentials, or may deny clients to publish on reserved channels and so on;
all these activities are controlled by the SecurityPolicy implementation installed
on the BayeuxServer.
| Method Summary | |
|---|---|
boolean |
canCreate(BayeuxServer server,
ServerSession session,
String channelId,
ServerMessage message)
Checks if a message should be allowed to create a new channel. |
boolean |
canHandshake(BayeuxServer server,
ServerSession session,
ServerMessage message)
Checks if a handshake message should be accepted. |
boolean |
canPublish(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
Checks if a client can publish a message to a channel. |
boolean |
canSubscribe(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
Checks if a client is allowed to subscribe to a channel. |
| Method Detail |
|---|
boolean canCreate(BayeuxServer server,
ServerSession session,
String channelId,
ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous publish is attempted)channelId - the channel to be createdmessage - the message trying to create the channel
boolean canHandshake(BayeuxServer server,
ServerSession session,
ServerMessage message)
server - the BayeuxServer objectsession - the session (not yet added to the BayeuxServer)message - the handshake message
ServerSession instance
associated to the BayeuxServer object
boolean canPublish(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous publish is attempted).channel - the channel to publish tomessage - the message to being published
boolean canSubscribe(BayeuxServer server,
ServerSession session,
ServerChannel channel,
ServerMessage message)
server - the BayeuxServer objectsession - the client sending the message (may be null if an anonymous subscribe is attempted).channel - the channel to subscribe tomessage - the subscribe message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||