Class JFTP.ChanSet
java.lang.Object
org.jcsp.net.dynamic.JFTP.ChanSet
- Enclosing class:
JFTP
Implementation of a set type structure for holding
ChannelOutput objects with
a flag to indicate that the request set is currently being processed.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleantrueif a class is currently being loaded.private VectorHolds theChannelOutputobjects. -
Constructor Summary
ConstructorsConstructorDescriptionChanSet(ChannelOutput out) Constructs a newChanSetwith an initial entry in the set. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequest(ChannelOutput out) Adds a request (the channel to reply on) to the set.booleanReturnstrueif a class is being loaded by another thread.voidSets the flag to indicate that a class is currently being loaded.voidwriteToAll(JFTP.ClassReply reply) Broadcast the reply to all of the clients in the set.
-
Field Details
-
set
Holds theChannelOutputobjects. -
beingProcessed
private boolean beingProcessedtrueif a class is currently being loaded.
-
-
Constructor Details
-
ChanSet
Constructs a newChanSetwith an initial entry in the set.
-
-
Method Details
-
nowBeingProcessed
public void nowBeingProcessed()Sets the flag to indicate that a class is currently being loaded. -
isBeingProcessed
public boolean isBeingProcessed()Returnstrueif a class is being loaded by another thread. -
addRequest
Adds a request (the channel to reply on) to the set.- Parameters:
out- channel to send the reply on.
-
writeToAll
Broadcast the reply to all of the clients in the set.- Parameters:
reply- the message to send.
-