コード例 #1
0
    @Override
    public void messageReceived(byte[] message) {
      // TOOO: this could have a leading field that identified which
      // class of message (server, client, etc.) this is, but for now
      // we'll just assume that all messages are RAFT-core

      RemoteServer.register(message, endpoint, membershipHandle);
      endpoint.removeListener(this);
    }
コード例 #2
0
 @Override
 public void newConnection(Endpoint endpoint) {
   endpoint.addListener(new EndpointListenerImpl(endpoint));
 }