Package com.rcll.refbox
Class RefboxHandler
- java.lang.Object
-
- com.rcll.refbox.RefboxHandler
-
- All Implemented Interfaces:
ProtobufMessageHandler
public class RefboxHandler extends java.lang.Object implements ProtobufMessageHandler
-
-
Constructor Summary
Constructors Constructor Description RefboxHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connection_lost(java.io.IOException e)
void
handle_message(@NonNull java.nio.ByteBuffer in_msg, @NonNull com.google.protobuf.GeneratedMessageV3 msg)
This method is called by the ProtobufClient/ProtobufBroadcastPeer.void
timeout()
-
-
-
Method Detail
-
handle_message
public void handle_message(@NonNull @NonNull java.nio.ByteBuffer in_msg, @NonNull @NonNull com.google.protobuf.GeneratedMessageV3 msg)
Description copied from interface:ProtobufMessageHandler
This method is called by the ProtobufClient/ProtobufBroadcastPeer. The GeneratedMessage passed to it is an instance of the same type as the protobuf message you received. It is used to identify the type of the protobuf message. The actual model is contained in the ByteBuffer. You can read the tutorial to find out how to handle incoming messages correctly.- Specified by:
handle_message
in interfaceProtobufMessageHandler
- Parameters:
in_msg
- the ByteBuffer containing the actual modelmsg
- the instance of the same type as the protobuf message you received
-
connection_lost
public void connection_lost(java.io.IOException e)
- Specified by:
connection_lost
in interfaceProtobufMessageHandler
-
timeout
public void timeout()
- Specified by:
timeout
in interfaceProtobufMessageHandler
-
-