ServiceEventSession class

The ServiceEventSession class encapsulates the processing involved in a service event.

Syntax

public class ServiceEventSession extends Session

Members

All members of ServiceEventSession, including inherited members.

Constructors
Modifier and Type Constructor Description
public ServiceEventSession(String, Server, SessionData) Construct a new session.
Methods
Modifier and Type Method Description
public void beginDataAndUpdateSteps() This method is called by the server prior to the execution of the "Data State Steps" and "Update Steps" (which are grouped together) for the service event.
public void beginReadSteps() This method is called by the server prior to the execution of the "Read Steps" for the service event.
public void beginServiceEventError() This method is called by the server prior to the execution of the "Error Steps" for the service event.
public void endDataAndUpdateSteps() This method is called after the "Data State Steps" and "Update Steps" (which are grouped together) for the service event have been successfully completed.
public void endReadSteps() This method is called after the "Read Steps" for the service event have been successfully completed.
public void endServiceEventError() This method is called after the "Error Steps" for the service event have been successfully completed.
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 service event is the component of the application that defines how data is synchronized between the Agentry Server and another external server application. It is made up of steps (which are implemented by the Steplet class in the Java system connection), each of which perform a specific task related to the synchronization process. These steps are organized into groups within the service event for specific areas of the data synchronization. These areas include the "Read", "Data State", "Update", and "Error Handling" steps.

This class contains methods to perform actions before and after each of these groups of steps. The default implementation of these methods in the AJAPI 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 createServiceEventSession method must be overridden to return the designer implemented subclass of the ServiceEventSession class.