|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapp.spa.SPAEventStreamChannel
public class SPAEventStreamChannel
Synchronous SPA event stream channel, acting both as a
SPAEventTarget
and as a SPAEventStreamSource
.
This is effectively a zero-slot channel connecting one or more event
source(s) (clients) to a single event target (server):
a new event cannot be accepted
(via the channel's SPAEventTarget
implementation) before
the acknowledgement for its predecessor has been delivered
(via the channel's SPAEventStreamSource
implementation).
Constructor Summary | |
---|---|
SPAEventStreamChannel(Logger lggr)
Constructs a new event channel, using the given logger. |
Method Summary | |
---|---|
void |
deliverAck(SPAEventAck ack)
Delivers the given acknowledgement in response to the most recently obtained player event. |
void |
deliverAck(java.lang.String ackmsg)
Delivers a new failure acknowledgement with the given descriptive text. |
void |
deliverOKAck()
Delivers an OK acknowledgement. |
SPAEvent |
getNextEvent()
Obtains and returns the most recently posted player event, blocking if necessary until it becomes available. |
SPAEventAck |
postEvent(EventId eid)
Posts a new event with the given id to this channel, blocking if necessary until it is ready to accept it, before obtaining and returning the corresponding acknowledgment. |
SPAEventAck |
postEvent(SPAEvent evt)
Posts the given event to this channel, blocking if necessary until it is ready to accept it, before obtaining and returning the corresponding acknowledgment. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SPAEventStreamChannel(Logger lggr)
Method Detail |
---|
public SPAEventAck postEvent(SPAEvent evt)
postEvent
in interface SPAEventTarget
public SPAEventAck postEvent(EventId eid)
postEvent
in interface SPAEventTarget
public SPAEvent getNextEvent() throws java.lang.InterruptedException
getNextEvent
in interface SPAEventStreamSource
java.lang.InterruptedException
public void deliverAck(SPAEventAck ack) throws java.lang.InterruptedException
deliverAck
in interface SPAEventStreamSource
java.lang.InterruptedException
public void deliverOKAck() throws java.lang.InterruptedException
deliverOKAck
in interface SPAEventStreamSource
java.lang.InterruptedException
public void deliverAck(java.lang.String ackmsg) throws java.lang.InterruptedException
deliverAck
in interface SPAEventStreamSource
java.lang.InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |