public interface ClusteredSessionNotificationPolicy
Note: The use of the word allowed above is intentional; if a given policy implementation
returns true
from one of the methods in this interface, that does not mean the listener will be invoked by the
container, nor does the presence of a method in this interface imply that it will be invoked by the container in all cases.
The only contract this interface creates is that before invoking a listener method, the container will invoke an
implementation of this policy to get permission and will not invoke the listeners if this policy returns false
.
If the container does not support emitting notifications in certain cases, it may not bother checking if the notification is
allowed, and even if it checks, it still will not emit the notification.
An example of a case where the container may not support emitting a notification is for a session that has never been used locally.
Modifier and Type | Method and Description |
---|---|
boolean |
isHttpSessionActivationListenerInvocationAllowed(ClusteredSessionManagementStatus status,
ClusteredSessionNotificationCause cause,
String attributeName)
Under the given conditions, are invocations of
HttpSessionActivationListener callbacks allowed? |
boolean |
isHttpSessionAttributeListenerInvocationAllowed(ClusteredSessionManagementStatus status,
ClusteredSessionNotificationCause cause,
String attributeName,
boolean local)
Under the given conditions, are invocations of
HttpSessionAttributeListener callbacks allowed? |
boolean |
isHttpSessionBindingListenerInvocationAllowed(ClusteredSessionManagementStatus status,
ClusteredSessionNotificationCause cause,
String attributeName,
boolean local)
Under the given conditions, are invocations of
HttpSessionBindingListener callbacks allowed? |
boolean |
isHttpSessionListenerInvocationAllowed(ClusteredSessionManagementStatus status,
ClusteredSessionNotificationCause cause,
boolean local)
Are invocations of
HttpSessionListener callbacks allowed under the given conditions? |
void |
setClusteredSessionNotificationCapability(ClusteredSessionNotificationCapability capability)
Provides the policy information about the container's capabilities with respect to issuing notifications.
|
boolean isHttpSessionListenerInvocationAllowed(ClusteredSessionManagementStatus status, ClusteredSessionNotificationCause cause, boolean local)
HttpSessionListener
callbacks allowed under the given conditions?status
- the status of the sessioncause
- the cause of the session notificationlocal
- true
if the event driving the notification originated on this node; false
otherwisetrue
if the notification is allowed, false
if notboolean isHttpSessionAttributeListenerInvocationAllowed(ClusteredSessionManagementStatus status, ClusteredSessionNotificationCause cause, String attributeName, boolean local)
HttpSessionAttributeListener
callbacks allowed?status
- the status of the sessioncause
- the cause of the session notificationattributeName
- value that would be passed to the name
param of the
HttpSessionBindingEvent
if the listener were invokedlocal
- true
if the event driving the notification originated on this node; false
otherwisetrue
if the notification is allowed, false
if notboolean isHttpSessionBindingListenerInvocationAllowed(ClusteredSessionManagementStatus status, ClusteredSessionNotificationCause cause, String attributeName, boolean local)
HttpSessionBindingListener
callbacks allowed?status
- the status of the sessioncause
- the cause of the session notificationattributeName
- value that would be passed to the name
param of the
HttpSessionBindingEvent
if the listener were invokedlocal
- true
if the event driving the notification originated on this node; false
otherwisetrue
if the notification is allowed, false
if notboolean isHttpSessionActivationListenerInvocationAllowed(ClusteredSessionManagementStatus status, ClusteredSessionNotificationCause cause, String attributeName)
HttpSessionActivationListener
callbacks allowed?status
- the status of the sessioncause
- the cause of the session notificationattributeName
- value that would be passed to the name
param of the HttpSessionEvent
if
the listener were invokedtrue
if the notification is allowed, false
if notvoid setClusteredSessionNotificationCapability(ClusteredSessionNotificationCapability capability)
capability
- the capability, Will not be null
.Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.