PushUserSession class

The PushSession class encapsulates the user-independent part of the processing involved in a push within an Agentry-based application.

Syntax

public class PushUserSession extends Session

Members

All members of PushUserSession, including inherited members.

Constructors
Modifier and Type Constructor Description
public PushUserSession(String, Server, SessionData, User) Construct a new session.
Methods
Modifier and Type Method Description
public void beginDisablePush() This method is called by the server prior to disabling a user push on any of the system connections.
public void beginEnablePush() This method is called by the server prior to enabling a user push on any of the system connections.
public void beginPushError() This method is called by the server prior to the execution of the "Error Steps" for the push.
public void beginPushResponse() This method is called by the server prior to the execution of the "Response Steps" for the push.
public void disablePush() This method is called when a user requests that a push be disabled on their behalf.
public void enablePush() This method is called when a user requests that a push be enabled on their behalf.
public void endDisablePush() This method is called after a user push has been disabled on all of the system connections.
public void endEnablePush() This method is called after a user push has been enabled on all of the system connections.
public void endPushError() This method is called by the server after the "Error Steps" for the push have been successfully executed.
public void endPushResponse() This method is called by the server after the "Response Steps" for the push have been successfully executed.
Inherited members from Session
Modifier and Type Member Description
public final void debug(String) Write the given message to a debug log, if debugging is enabled.
public String getName() Returns the name of the session, as configured in the Agentry application.
public Server getServer() Returns the Server singleton object that the Java system connection is currently using.
public SessionData getSessionData() Returns the session data for this session.
public User getUser() Returns the user for this session, if any.
protected Session(String, Server, SessionData, User) Construct a new session, and save each of the arguments so that they can be retrieved later via the getName(), getServer(), getSessionData(), and getUser() methods.
protected Session(String, Server, SessionData) Construct a new session, and save each of the arguments so that they can be retrieved later via the getName(), getServer(), and getSessionData() methods.
public void sessionAborted() This is called if the session is aborted (e.g., by an exception).

Usage

In brief, a push is an application component that defines the transfer of data between the client and the server. Unlike fetches, the transfer within a push is initiated by the server, rather than the client. A push is made up of steps, grouped in varying categories. The steps in each of these groups are run separately. The groups are "Retrieval", "Removal", "Object Read", "Response" and "Error"; this class handles the "Response" and "Error" groups, which are user-dependent.

This class contains methods to perform actions before and after each of these groups of steps. The default implementation of these methods in the AJ-API perform no additional specific actions. A designer can extend this class if special processing is required before or after each of these groups of steps are processed. If this class is extended, the Server class must also be extended and its createPushUserSession method must be overridden to return the new subclass.

This class also provides methods for notifying the Agentry server when it should enable or disable push events for a particular user.