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

java.lang.Object
  extended byedu.nyu.cs.pdsg.switchboard.SbStatus
      extended byedu.nyu.cs.pdsg.switchboard.SbLayer
          extended byedu.nyu.cs.pdsg.switchboard.sbmux.SbMux
All Implemented Interfaces:
SbAsyncTransportClient, SbAsyncTransportProvider, SbAsyncTransportRecipient, SbClient, SbLayerable, SbProvider

public class SbMux
extends SbLayer


Nested Class Summary
 class SbMux.ChannelAllocator
           
 
Field Summary
(package private)  SbMux.ChannelAllocator channelAllocator
           
 
Fields inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
client, createStackTrace, eventHandler, provider, recipient
 
Fields inherited from class edu.nyu.cs.pdsg.switchboard.SbStatus
STATUS_CLOSED, STATUS_LIVE, STATUS_PARTNER_CLOSED, STATUS_RECOVERABLE, STATUS_UNRECOVERABLE
 
Constructor Summary
SbMux(SbAsyncTransportProvider _transport)
           
 
Method Summary
 int allocChannel()
           
 void close()
           
 void deliver(java.lang.Object _obj)
          Defines the behavior how to deliver an Object to the layer above.
 void freeChannel(int channelNum)
           
 java.lang.String getLayerType()
           
 java.lang.Object readChannel(int channelNum)
           
 java.lang.Object readChannel(int channelNum, boolean blocking)
           
 void writeChannel(int channelNum, java.lang.Object obj)
           
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
_close, behavesLike, closeQuiet, finalize, find, getProviderException, getProviderStackTrace, getProviderStatus, getTransportName, handleEvent, handleEvent, init, instanceOf, isKindOf, isOpen, isReady, providerReady, providerStatusString, recipientReady, sendDown, sendUp, serialize, setClient, setEventHandler, setProvider, setProviderStatus, setProviderStatus, setProviderStatusSend, setRecipient, toShortString, toString, unserialize, write
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbStatus
statusString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

channelAllocator

SbMux.ChannelAllocator channelAllocator
Constructor Detail

SbMux

public SbMux(SbAsyncTransportProvider _transport)
Method Detail

allocChannel

public int allocChannel()

freeChannel

public void freeChannel(int channelNum)

readChannel

public java.lang.Object readChannel(int channelNum)
                             throws java.lang.ArrayIndexOutOfBoundsException,
                                    java.io.IOException
Throws:
java.lang.ArrayIndexOutOfBoundsException
java.io.IOException

readChannel

public java.lang.Object readChannel(int channelNum,
                                    boolean blocking)
                             throws java.lang.ArrayIndexOutOfBoundsException,
                                    java.io.IOException
Throws:
java.lang.ArrayIndexOutOfBoundsException
java.io.IOException

writeChannel

public void writeChannel(int channelNum,
                         java.lang.Object obj)
                  throws java.io.IOException
Throws:
java.io.IOException

deliver

public void deliver(java.lang.Object _obj)
Description copied from interface: SbAsyncTransportRecipient
Defines the behavior how to deliver an Object to the layer above.

Specified by:
deliver in interface SbAsyncTransportRecipient
Overrides:
deliver in class SbLayer

close

public void close()
Specified by:
close in interface SbProvider
Overrides:
close in class SbLayer

getLayerType

public java.lang.String getLayerType()
Overrides:
getLayerType in class SbLayer


Copyright (c) 2002-2003 New York University RLAB