|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.twistedmatrix.spread.Banana
|
+--com.twistedmatrix.spread.pb.Broker
Network connection over which the PB protocol runs.
| Inner Class Summary | |
static class |
Broker.Error
An exception in the protocol. |
| Inner classes inherited from class com.twistedmatrix.spread.Banana |
Banana.ProtocolException |
| Field Summary | |
protected static ByteString |
ANSWER
|
static ByteString |
CONNECTION_LOST
|
protected static ByteString |
DECREF
|
protected static ByteString |
DNU
|
protected static ByteString |
ERROR
|
protected static ByteString |
LOCAL
|
protected static ByteString |
MESSAGE
|
protected static java.lang.Integer |
protocolVersion
|
protected static ByteString |
REMOTE
|
protected static ByteString |
VERSION
|
| Fields inherited from class com.twistedmatrix.spread.Banana |
DIALECTS, disconnected, FLOAT, HIGH_BIT_SET, in, INT, LIST, LONGINT, LONGNEG, NEG, NONE, out, PB, STRING, VOCAB, vocabulary |
| Constructor Summary | |
Broker(JellyPolicy policy,
StreamPair sp,
boolean isClient)
Create a new instance given a pair of streams. |
|
Broker(StreamPair sp,
boolean isClient)
Create a new instance given a pair of streams. |
|
| Method Summary | |
void |
close()
Close the connection. |
protected void |
connectionLost()
|
protected void |
expressionReceived(java.lang.Object exp)
|
JellyPolicy |
getPolicy()
Get the Broker's JellyPolicy. |
Referenceable |
localObjectForID(java.lang.Object objectID)
Get local object that is being called by remote. |
void |
notifyOnDisconnect(Callback c)
Register a callback for when the connection is lost. |
RemoteReference |
remoteForName(ByteString name)
Get a reference to a remote object based on its name. |
java.lang.Integer |
remoteReference(Referenceable object)
Register and get and ID for a local object. |
protected void |
sendAnswer(java.lang.Integer requestID,
java.lang.Object netResult)
Send an error response to a message. |
protected void |
sendDecRef(java.lang.Object objectID)
Send a decref for an object. |
protected void |
sendError(java.lang.Integer requestID,
Failure reason)
Send an error response to a message. |
protected void |
sendMessage(ByteString perspective,
java.lang.Object objectID,
ByteString message,
java.lang.Object[] args,
PrimitiveMap kwargs,
Callback callback)
Send a message to a remote object. |
protected java.lang.Object |
serialize(java.lang.Object o)
Serialize an object using Jelly. |
void |
setNameForLocal(ByteString name,
Referenceable local)
Set a string ID for an object. |
void |
start()
Start running. |
protected java.lang.Object |
unserialize(java.lang.Object o)
Unserialize an object using Jelly. |
protected java.lang.Object |
unserialize(java.lang.Object o,
ByteString perspective)
Unserialize an object using Jelly. |
| Methods inherited from class com.twistedmatrix.spread.Banana |
handshake, read, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final ByteString VERSION
protected static final ByteString DNU
protected static final ByteString MESSAGE
protected static final ByteString ANSWER
protected static final ByteString ERROR
protected static final ByteString DECREF
protected static final ByteString REMOTE
protected static final ByteString LOCAL
protected static final java.lang.Integer protocolVersion
public static final ByteString CONNECTION_LOST
| Constructor Detail |
public Broker(JellyPolicy policy,
StreamPair sp,
boolean isClient)
public Broker(StreamPair sp,
boolean isClient)
| Method Detail |
public void start()
start in class Bananaprotected void expressionReceived(java.lang.Object exp)
public java.lang.Integer remoteReference(Referenceable object)
public Referenceable localObjectForID(java.lang.Object objectID)
public void setNameForLocal(ByteString name,
Referenceable local)
public void notifyOnDisconnect(Callback c)
public void close()
close in class Bananapublic JellyPolicy getPolicy()
protected void connectionLost()
protected void sendDecRef(java.lang.Object objectID)
protected void sendError(java.lang.Integer requestID,
Failure reason)
protected void sendAnswer(java.lang.Integer requestID,
java.lang.Object netResult)
protected java.lang.Object serialize(java.lang.Object o)
protected java.lang.Object unserialize(java.lang.Object o,
ByteString perspective)
protected java.lang.Object unserialize(java.lang.Object o)
public RemoteReference remoteForName(ByteString name)
protected void sendMessage(ByteString perspective,
java.lang.Object objectID,
ByteString message,
java.lang.Object[] args,
PrimitiveMap kwargs,
Callback callback)
throws java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||