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

com.ddfplus.util.StoreFeedHandler 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.util;

import com.ddfplus.api.FeedHandler;
import com.ddfplus.enums.DdfMessageType;
import com.ddfplus.messages.DdfMessageBase;

public class StoreFeedHandler implements FeedHandler {

	private MessageStore store;

	public StoreFeedHandler(MessageStore store) {
		this.store = store;
	}

	@Override
	public void onMessage(DdfMessageBase msg) {
		if (msg.getMessageType() == DdfMessageType.Timestamp) {
			return;
		}
		store.storeMessage(msg.getBytes());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy