All Packages Class Hierarchy This Package Previous Next Index
Class ants.InChannel
java.lang.Object
|
+----ants.Entity
|
+----ants.ManagedObject
|
+----ants.InChannel
- public class InChannel
- extends ManagedObject
- implements Runnable
The InChannel is responsible for decoding and processing all packets
stemming from an incoming flow, denoted by a flow handle.
THIS IS THE UNIT OF RESOURCE CONSUMPTION. One InChannel per protocol
is created. InChannels can be instantiated for both locally installed
protocols and those loaded on demand.
An InChannel is associated with a flow handle that is its source of
packets to decode and process. Each InChannel will instantiate incoming
Capsules in a separate name space. This is done by providing a separate
class loader.
In ANTS 1.2, this used to be ChannelThread. I'm not really happy with
the name "InChannel", however. A better name might be "ProtocolProcessor".
-
InChannel(Node, boolean)
- constructor for protocols instantiated due to a remote request
-
InChannel(Node, Protocol, String, boolean)
- constructor for locally instantiated protocols;
protocol and name are known.
-
decode(Buffer)
- decode ANTS packets.
-
getFlowHandle()
-
-
receive()
- extract the next capsule from the flow
-
run()
- Main loop for an InChannel.
-
start()
- a one-time start of the channel only
InChannel
public InChannel(Node node,
Protocol p,
String name,
boolean replenish)
- constructor for locally instantiated protocols;
protocol and name are known.
- Parameters:
- p - The Protocol whose packets should be handled by this InChannel
InChannel
public InChannel(Node node,
boolean replenish)
- constructor for protocols instantiated due to a remote request
decode
protected Capsule decode(Buffer buf) throws Exception
- decode ANTS packets.
receive
public Capsule receive() throws Exception
- extract the next capsule from the flow
start
public void start()
- a one-time start of the channel only
- Overrides:
- start in class Entity
getFlowHandle
public FlowHandle getFlowHandle()
- Returns:
- the flow handle associated with that InChannel
run
public void run()
- Main loop for an InChannel.
This used to be the main loop of ChannelThread.
All Packages Class Hierarchy This Package Previous Next Index