|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcsp.lang.Guard
org.jcsp.lang.AltingConnectionClient
org.jcsp.lang.AltingConnectionClientImpl
public class AltingConnectionClientImpl
This class does not need to be used by standard JCSP users. It is exposed so that the connection mechanism can be extended for custom connections.
Constructor Summary | |
---|---|
protected |
AltingConnectionClientImpl(AltingChannelInput fromServer,
ChannelOutput openToServer,
ChannelOutput reqToServer,
ChannelOutput backToClient)
Constructs a new instance. |
Method Summary | |
---|---|
protected void |
claim()
This claims a lock on the client. |
boolean |
isOpen()
Returns whether the server has kept its end of the Connection open. |
protected void |
release()
This releases a lock on the client. |
Object |
reply()
Receives some data back from the server after request(Object) has been called. |
void |
request(Object data)
Sends some data over the connection to server once the connection has been opened. |
Methods inherited from class org.jcsp.lang.AltingConnectionClient |
---|
getAltingChannel, pending, setAltingChannel |
Methods inherited from class org.jcsp.lang.Guard |
---|
schedule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AltingConnectionClientImpl(AltingChannelInput fromServer, ChannelOutput openToServer, ChannelOutput reqToServer, ChannelOutput backToClient)
Method Detail |
---|
public void request(Object data) throws IllegalStateException
data
- the Object
to send to the server.
IllegalStateException
- if the method is called when it is
not meant to be.public Object reply() throws IllegalStateException
request(Object)
has been called.
Object
sent from the server.
IllegalStateException
- if the method is called when it is
not meant to be.public boolean isOpen() throws IllegalStateException
reply()
and
before any other Connection method is called.
true
iff the server has kept the connection
open.
IllegalStateException
protected void claim()
protected void release()
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |