Developer

Service Event Type: Java Callback

A Java Callback service event type includes a Java code component that is an extension of the ServiceEvent Agentry Java API class. Included in this class must be a method into which the source back-end system can call in to SAP Mobile Platform Server as a notification of a modification to that back-end system’s data. This class is instantiated when the service event is loaded by the Server during startup. The information passed to this method must include the key property of the service event’s defined object type. When a message is received by this class that includes the service event’s target object’s key property the read steps, data state steps, and update steps will are processed by SAP Mobile Platform Server to update the destination back-end system.

The Java code component of this service event type is initially created as a skeleton class. The developer must then implement the methods for this class to process the message received from the source back end system. It may include additional methods for processing the message once received, but only one method within the class can be called by the source back end. Data captured from the source back end must then be passed from this class to the Agentry Server using the standards within the Agentry Java API.

Java Callback Service Event Attributes:

  • Name: The internal unique name for the service event definition, must be unique among all service events defined within the same module.
  • Connection: This attribute references a Java Virtual Machine system connection within the application. This system connection is the one to with which the service event will communicate. This connection will be the one over which the source back end system sends the message to the service event when a data change occurs. This system connection must exist prior to defining the service event and it must be of type Java Virtual Machine.
  • Object Type: This attribute specifies the target object type of the service event. The properties of this object will store the data retrieved from the source back end to be updated to the destination back end. This may include child object collections where necessary.
  • Read Steps: This attribute specifies whether to retrieve data from the source back end system using the read steps defined in the service event, or those defined in the target object type of the service event. When this attribute is true, the object’s read steps will be used and the service event’s read steps will not be processed.