Class DataSourceUpdateEvent

java.lang.Object
com.caplin.transformer.module.DataSourceUpdateEvent

public class DataSourceUpdateEvent extends Object

Allows the Transformer module to access information about an update that has been received. A DataSourceUpdateEvent object is passed into the SubscriptionListener.update method.

  • Constructor Details

    • DataSourceUpdateEvent

      public DataSourceUpdateEvent(int dataSourcePeerId, TransformerData transformerData, long time)

      Constructs the DataSourceUpdateEvent with the specified peer identifier, update object and time.

      Parameters:
      dataSourcePeerId - Identifier for the DataSource peer that supplied the update.
      transformerData - The update data from the Transformer.
      time - The time the data was received by the Transformer core. This is represented as the number of seconds since 1st January 1970, 00:00:00.
  • Method Details

    • getDataSourcePeerId

      public int getDataSourcePeerId()

      Gets the identifier for the data source peer that supplied the update.

      Returns:
      The data source peer identifier.
    • getTransformerData

      public TransformerData getTransformerData()

      Gets the TransformerData object that represents the update.

      Returns:
      The TransformerData that represents the update.
      See Also:
    • getTime

      public long getTime()

      Gets the time the update was received by the Transformer core. This is represented as the number of seconds since 1st January 1970, 00:00:00.

      Returns:
      The time the data was received by the Transformer core.