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

com.ddfplus.api.ConnectionEvent Maven / Gradle / Ivy

There is a newer version: 1.1.7
Show newest version
/**
 * Copyright (C) 2004 - 2015 by Barchart.com, Inc. All Rights Reserved.
 * 
 * This software is the proprietary information of Barchart.com, Inc.
 * Use is subject to license terms.
 */
package com.ddfplus.api;

/**
 * Connection Event.
 * 
 * @see ConnectionEventType
 */
public class ConnectionEvent {

	private ConnectionEventType type;

	private boolean isReconnect;

	public ConnectionEvent(ConnectionEventType type) {
		this.type = type;
	}

	public ConnectionEvent(ConnectionEventType type, boolean reconnection) {
		this(type);
		isReconnect = reconnection;
	}

	public ConnectionEventType getType() {
		return type;
	}

	public void setType(ConnectionEventType type) {
		this.type = type;
	}

	public boolean isReconnect() {
		return isReconnect;
	}

	public void setReconnect(boolean isReconnect) {
		this.isReconnect = isReconnect;
	}

	@Override
	public String toString() {
		return "Connection Event: " + type + " reconnect: " + isReconnect;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy