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

org.datafx.websocket.DataFXEndpoint Maven / Gradle / Ivy

There is a newer version: 8.0b5
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.datafx.websocket;

import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
import javax.websocket.MessageHandler;
import javax.websocket.Session;

/**
 *
 * @author johan
 */
public class DataFXEndpoint extends Endpoint implements MessageHandler.Whole {

    static protected WebSocketReader parent;
    
    @Override
    public void onOpen(Session session, EndpointConfig config) {
        session.addMessageHandler(this);
    }

    public void onMessage(String message) {
        System.out.println("DataFXEndpoint got a message!!");
        parent.addAvailableData(message);
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy