com.googlecode.mobilityrpc.network.impl
Interface OutgoingMessageHandler
- All Known Subinterfaces:
- MobilityControllerInternal
- All Known Implementing Classes:
- MobilityControllerImpl
public interface OutgoingMessageHandler
An internal interface, implemented by objects which can accept a Java object representation of a protocol
message, and submit it for serialization and sending to a remote machine.
- Author:
- Niall Gallagher
|
Method Summary |
void |
sendOutgoingMessage(ConnectionId connectionId,
Object message)
Serializes the supplied message object and submits it to the outgoing message queue of the connection indicated,
such that it will be sent to the machine at the other end of the connection for processing. |
sendOutgoingMessage
void sendOutgoingMessage(ConnectionId connectionId,
Object message)
- Serializes the supplied message object and submits it to the outgoing message queue of the connection indicated,
such that it will be sent to the machine at the other end of the connection for processing.
The object supplied must be an instance of one of the Java protocol message representations from the
com.googlecode.mobilityrpc.protocol.pojo package, such that it can be serialized to its protobuf counterpart
representation.
The object supplied will be serialized to protobuf format synchronously inside this method, by the thread
calling this method. The method will only then submit the message in protobuf format to the connection's
outgoing message queue, where it will be sent asynchronously.
As such if the object supplied cannot be serialized to protobuf format, this method will throw an exception
to the code calling this method. This method does not block.
- Parameters:
connectionId - Identifies the connection through which the message should be sentmessage - A java object representation of a protocol message
Copyright © 2012. All Rights Reserved.