com.global.api.gateways.events.FailOverEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.gateways.events;
import org.joda.time.DateTime;
public class FailOverEvent extends GatewayEvent {
private DateTime started;
private DateTime complete;
private long getConnectionTime() {
if (complete != null) {
return complete.getMillis() - started.getMillis();
}
else {
return 0;
}
}
public String getEventMessage() {
String rvalue = super.getEventMessage();
return rvalue.concat(String.format("Connection failed (milliseconds): %sms", getConnectionTime()));
}
public FailOverEvent(String connectorName, DateTime started, DateTime complete) {
super(connectorName, GatewayEventType.FailOver);
this.started = started;
this.complete = complete;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy