edu.rit.m2mp
Class NullChannel
java.lang.Object
edu.rit.m2mp.Channel
edu.rit.m2mp.NullChannel
public class NullChannel
- extends Channel
Class NullChannel provides an M2MP
Channel
implementation that does not send or receive messages. If the M2MP Layer
should not communicate on an external network, configure the M2MP Layer to
use a NullChannel.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullChannel
public NullChannel(PacketPool thePacketPool)
- Construct a new null channel.
- Parameters:
thePacketPool
- Packet pool.
- Throws:
NullPointerException
- (unchecked exception) Thrown if thePacketPool is null.
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.