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

com.global.api.gateways.events.GatewayEvent Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.gateways.events;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

public abstract class GatewayEvent implements IGatewayEvent {
    private String connectorName;
    private GatewayEventType eventType;
    protected DateTime timestamp;

    GatewayEvent(String connectorName, GatewayEventType eventType) {
        this.connectorName = connectorName;
        this.eventType = eventType;
        this.timestamp = DateTime.now(DateTimeZone.UTC);
    }

    public String getConnectorName() {
        return connectorName;
    }
    public GatewayEventType getEventType() {
        return eventType;
    }
    public String getTimestamp() {
        return timestamp.toString("MM-dd-yyyy hh:mm:ss.SSS");
    }
    public String getEventMessage() {
        return String.format("[%s] - ", getTimestamp());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy