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

org.spincast.quickstart.exchange.AppWebsocketContextDefault Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package org.spincast.quickstart.exchange;

import org.spincast.core.websocket.WebsocketContextBase;
import org.spincast.core.websocket.WebsocketContextBaseDeps;
import org.spincast.core.websocket.WebsocketPeerManager;

import com.google.inject.assistedinject.Assisted;
import com.google.inject.assistedinject.AssistedInject;

/**
 * Implementation of our custom Websocket Context type.
 */
public class AppWebsocketContextDefault extends WebsocketContextBase
                                        implements AppWebsocketContext {

    @AssistedInject
    public AppWebsocketContextDefault(@Assisted("endpointId") String endpointId,
                                      @Assisted("peerId") String peerId,
                                      @Assisted WebsocketPeerManager peerManager,
                                      WebsocketContextBaseDeps deps) {
        super(endpointId,
              peerId,
              peerManager,
              deps);
    }

    @Override
    public void helloCurrentPeer() {
        sendMessageToCurrentPeer("Hello!");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy