com.twistedmatrix.spread.pb
Class SimpleReferenceable
java.lang.Object
|
+--com.twistedmatrix.spread.pb.SimpleReferenceable
- All Implemented Interfaces:
- Referenceable
- public class SimpleReferenceable
- extends java.lang.Object
- implements Referenceable
An object that can be referenced by remote peers.
In order to support a remote call to method "foo", a subclass must define
a method called "remote_foo", with the signature:
public Object remote_foo(Object[] args, PrimitiveMap kwargs);
These methods will be called and the result returned - they should not
block when called.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleReferenceable
public SimpleReferenceable()
remoteMessageReceived
public void remoteMessageReceived(Broker broker,
ByteString message,
java.lang.Object[] args,
PrimitiveMap kwargs,
Callback response)
- Handle a message from a remote client.
- Specified by:
remoteMessageReceived
in interface Referenceable
- Returns:
- the result of whatever we do to handle the message.
remoteSerialize
public java.lang.Object[] remoteSerialize(Broker broker)
- Serialize the object.
- Specified by:
remoteSerialize
in interface Referenceable