edu.rit.m2mp
Class FlowController
java.lang.Object
edu.rit.m2mp.Channel
edu.rit.m2mp.FlowController
public class FlowController
- extends Channel
Class FlowController provides an object that does flow control for the M2MP
Layer. For further information, see
"Packet Format and Processing".
A flow controller is a
Channel
object that is
interposed between the rest of the M2MP Layer and the channel object that
interfaces with the external network.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlowController
public FlowController(PacketPool thePacketPool,
Channel theChannel)
- Construct a new flow controller. To receive incoming packets, the flow
controller will obtain
Packet
objects from
the given
PacketPool
. The flow controller
will send and receive packets using the given external channel.
- Parameters:
thePacketPool
- Packet pool.theChannel
- External channel.
- Throws:
NullPointerException
- (unchecked exception) Thrown if thePacketPool is null or
theChannel is null.
M2MPInitializationException
- (unchecked exception) Thrown if the flow controller could not be
initialized.
receivePacket
public Packet receivePacket()
throws IOException
- Receive an M2MP packet via this channel.
- Specified by:
receivePacket
in class Channel
- Returns:
- M2MP packet that was received.
- Throws:
IOException
- Thrown if an I/O error occurred.
transmitPacket
public void transmitPacket(Packet thePacket)
throws IOException
- Send the given M2MP packet via this channel.
- Specified by:
transmitPacket
in class Channel
- Parameters:
thePacket
- M2MP packet to be sent.
- Throws:
IOException
- Thrown if an I/O error occurred.
Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.