All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.casper.sdk.model.event.Event Maven / Gradle / Ivy

Go to download

SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.

The newest version!
package com.casper.sdk.model.event;

import java.util.Optional;

/**
 * The interface implemented by all events that are read from a nodes event stream
 *
 * @author [email protected]
 */
public interface Event {

    /**
     * The node URL that is the source of the event
     *
     * @return the  URL of the source node
     */
    String getSource();

    /**
     * The key name of the data field.
     *
     * @return the key name of the data field
     */
    DataType getDataType();

    /**
     * The event payload a JSON string or Pojo
     *
     * @return the event payload
     */
    T getData();

    /**
     * The optional ID of the event
     *
     * @return the optional ID
     */
    Optional getId();

    /**
     * Obtains the API version of the event
     * @return the API version
     */
    String getVersion();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy