com.google.bitcoin.net
Interface ProtobufParser.Listener<MessageType extends com.google.protobuf.MessageLite>

Type Parameters:
MessageType - The protobuf type which is used on this socket. This MUST match the MessageType used in the parent ProtobufParser
Enclosing class:
ProtobufParser<MessageType extends com.google.protobuf.MessageLite>

public static interface ProtobufParser.Listener<MessageType extends com.google.protobuf.MessageLite>

An interface which can be implemented to handle callbacks as new messages are generated and socket events occur.


Method Summary
 void connectionClosed(ProtobufParser<MessageType> handler)
          Called when the connection is closed and no more data should be provided.
 void connectionOpen(ProtobufParser<MessageType> handler)
          Called when the connection is opened and available for writing data to.
 void messageReceived(ProtobufParser<MessageType> handler, MessageType msg)
          Called when a new protobuf is received from the remote side.
 

Method Detail

messageReceived

void messageReceived(ProtobufParser<MessageType> handler,
                     MessageType msg)
Called when a new protobuf is received from the remote side.


connectionOpen

void connectionOpen(ProtobufParser<MessageType> handler)
Called when the connection is opened and available for writing data to.


connectionClosed

void connectionClosed(ProtobufParser<MessageType> handler)
Called when the connection is closed and no more data should be provided.



Copyright © 2014. All rights reserved.