Package org.jcsp.net.dynamic
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 boolean
true
if a class is currently being loaded.private Vector
Holds theChannelOutput
objects. -
Constructor Summary
ConstructorsConstructorDescriptionChanSet
(ChannelOutput out) Constructs a newChanSet
with an initial entry in the set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRequest
(ChannelOutput out) Adds a request (the channel to reply on) to the set.boolean
Returnstrue
if a class is being loaded by another thread.void
Sets the flag to indicate that a class is currently being loaded.void
writeToAll
(JFTP.ClassReply reply) Broadcast the reply to all of the clients in the set.
-
Field Details
-
set
Holds theChannelOutput
objects. -
beingProcessed
private boolean beingProcessedtrue
if a class is currently being loaded.
-
-
Constructor Details
-
ChanSet
Constructs a newChanSet
with 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()Returnstrue
if 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.
-