ServiceEvent class

This class implements a Java Callback Service Event in Agentry.

Syntax

public class ServiceEvent extends AgentryJavaBackEndManagedObject

Members

All members of ServiceEvent, including inherited members.

Variables
Modifier and Type Variable Description
protected Server _server The active Server implementation in the Agentry Java system connection.
protected SessionData _sessionData Session data for this service event session.
Constructors
Modifier and Type Constructor Description
public ServiceEvent(Server, SessionData, CallbackInterface) Constructs a new ServiceEvent object.
Methods
Modifier and Type Method Description
public final void dataReceived(Object) This method should be called once you have obtained an object's data from the remote system.

Usage

In a Java Callback Service Event, a remote enterprise system initiates a call into this class, then retrieves data for a single Agentry object and passes that data back to the Agentry server. (The Agentry object can be a collection, if you need to handle multiple objects of the same type at once.) The general process works like this:

  1. The enterprise system somehow triggers a call to a method in your custom subclass of ServiceEvent.
  2. Your custom method acquires data from the enterprise system for a single Agentry object and stores it into a custom Java object. This object is implemented the same way as objects returned by ComplexTable or Steplet - it must contain public fields that can be mapped back to fields in an Agentry object.
  3. Your custom method then calls the dataReceived method with the new object, which communicates that object back to Agentry.
  4. Agentry processes the object, maps it to the Agentry object, and fires the various steps defined for the Service Event in the application for handling the object, which in turn will cause the various methods of ServiceEventSession to be invoked.

How the enterprise system actually triggers a call into this class is up to you. Possible methods might include remote RMI calls into the Agentry JVM, receiving JMS messages, or whatever else you can come up with.