Package org.jcsp.net.dynamic
Class JFTP.ChanSet
- java.lang.Object
-
- org.jcsp.net.dynamic.JFTP.ChanSet
-
- Enclosing class:
- JFTP
private static class JFTP.ChanSet extends java.lang.Object
Implementation of a set type structure for holdingChannelOutput
objects with a flag to indicate that the request set is currently being processed.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
beingProcessed
true
if a class is currently being loaded.private java.util.Vector
set
Holds theChannelOutput
objects.
-
Constructor Summary
Constructors Constructor Description ChanSet(ChannelOutput out)
Constructs a newChanSet
with an initial entry in the set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequest(ChannelOutput out)
Adds a request (the channel to reply on) to the set.boolean
isBeingProcessed()
Returnstrue
if a class is being loaded by another thread.void
nowBeingProcessed()
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.
-
-
-
Constructor Detail
-
ChanSet
public ChanSet(ChannelOutput out)
Constructs a newChanSet
with an initial entry in the set.
-
-
Method Detail
-
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
public void addRequest(ChannelOutput out)
Adds a request (the channel to reply on) to the set.- Parameters:
out
- channel to send the reply on.
-
writeToAll
public void writeToAll(JFTP.ClassReply reply)
Broadcast the reply to all of the clients in the set.- Parameters:
reply
- the message to send.
-
-