|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.pack.proto.BaseProtocol
The base class for PACK protocol suit.
Nested Class Summary | |
(package private) class |
BaseProtocol.ProtocolState
|
Field Summary | |
protected InputBufferManager |
_inbufman
|
protected static org.apache.log4j.Logger |
_log
|
protected OutputBufferManager |
_outbufman
|
protected BaseProtocol.ProtocolState |
_state
|
Constructor Summary | |
BaseProtocol(int bt,
int mt,
int st)
|
Method Summary | |
void |
addPublisher(Id pubId)
Add a publisher that may put events in this buffer manager. |
void |
addSubscriber(Id pubId,
Id subId,
java.lang.Object policy)
Add a local subscriber that may get events from this manager. |
void |
addSubscriber(Id pubId,
Id subId,
java.lang.Object policy,
Address from)
Add a remote subscriber that may get events from this manager. |
private void |
assertPubRegistered(Id pubId)
|
Event |
getEvent()
Get an event from protocol buffers for processing. |
boolean |
hasPublisher(Id pubId)
Whether this manager contains the specified publisher. |
void |
putEvent(Event evt,
Address from)
Put a received event into protocol buffers. |
void |
removePublisher(Id pubId)
Cancel all the buffers for specified publisher. |
void |
removeSubscriber(Id subId)
Cancel all the buffers for specified subscriber. |
void |
resumeSubscriber(java.lang.Object subkey)
Restart delivering events to specified subscriber. |
void |
suspendSubscriber(java.lang.Object subkey)
Stop delivering the event to subscriber, but continue receiving events. |
java.lang.String |
toString()
Return the string representation of this protocol. |
void |
update(ProtocolEvent evt)
Update the protocol state with control events. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger _log
protected BaseProtocol.ProtocolState _state
protected InputBufferManager _inbufman
protected OutputBufferManager _outbufman
Constructor Detail |
public BaseProtocol(int bt, int mt, int st)
Method Detail |
public void addPublisher(Id pubId)
public boolean hasPublisher(Id pubId)
public void addSubscriber(Id pubId, Id subId, java.lang.Object policy)
public void addSubscriber(Id pubId, Id subId, java.lang.Object policy, Address from)
public void removePublisher(Id pubId)
public void removeSubscriber(Id subId)
public void suspendSubscriber(java.lang.Object subkey)
public void resumeSubscriber(java.lang.Object subkey)
public java.lang.String toString()
toString
in class java.lang.Object
public void putEvent(Event evt, Address from)
Protocol
putEvent
in interface Protocol
public Event getEvent() throws java.lang.InterruptedException
Protocol
getEvent
in interface Protocol
java.lang.InterruptedException
public void update(ProtocolEvent evt)
Protocol
update
in interface Protocol
private void assertPubRegistered(Id pubId)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |