edu.nyu.cs.pdsg.switchboard.sbmux
Class SbMux.ChannelAllocator

java.lang.Object
  extended byedu.nyu.cs.pdsg.switchboard.sbmux.SbMux.ChannelAllocator
Enclosing class:
SbMux

public class SbMux.ChannelAllocator
extends java.lang.Object


Field Summary
 java.util.Set allocatedChannels
           
protected  java.util.Vector channels
           
protected  java.util.Stack freeChannels
           
protected  int nextFreeChannel
           
 
Constructor Summary
SbMux.ChannelAllocator()
           
 
Method Summary
(package private)  int alloc()
           
(package private)  void free(int channelNum)
           
(package private)  SbChannel getChannel(int channelNum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextFreeChannel

protected int nextFreeChannel

freeChannels

protected java.util.Stack freeChannels

channels

protected java.util.Vector channels

allocatedChannels

public java.util.Set allocatedChannels
Constructor Detail

SbMux.ChannelAllocator

public SbMux.ChannelAllocator()
Method Detail

alloc

int alloc()

free

void free(int channelNum)
    throws java.lang.ArrayIndexOutOfBoundsException
Throws:
java.lang.ArrayIndexOutOfBoundsException

getChannel

SbChannel getChannel(int channelNum)
               throws java.lang.ArrayIndexOutOfBoundsException
Throws:
java.lang.ArrayIndexOutOfBoundsException


Copyright (c) 2002-2003 New York University RLAB