edu.nyu.cs.pdsg.switchboard.clientstreams
Class SbClientStreamsLayer

java.lang.Object
  extended byedu.nyu.cs.pdsg.switchboard.SbStatus
      extended byedu.nyu.cs.pdsg.switchboard.SbLayer
          extended byedu.nyu.cs.pdsg.switchboard.clientstreams.SbClientStreamsLayer
All Implemented Interfaces:
SbAsyncTransportClient, SbAsyncTransportProvider, SbAsyncTransportRecipient, SbClient, SbLayerable, SbProvider
Direct Known Subclasses:
SbStreamsStack

public class SbClientStreamsLayer
extends SbLayer


Field Summary
(package private)  SbClientOutputStream fromClientStream
           
(package private)  BlockingQueue inputQueue
           
(package private)  SbPipe toClient
           
(package private)  ToClientThread toClientThread
           
 
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
SbClientStreamsLayer(SbAsyncTransportProvider _below)
           
 
Method Summary
 void _close()
          Closes this layer and all layers underneath it.
protected  void clientStreamsSendDown(java.lang.Object o)
           
 void deliver(java.lang.Object obj)
          Defines the behavior how to deliver an Object to the layer above.
 java.io.InputStream getInputStream()
           
 java.lang.String getLayerType()
           
 java.io.OutputStream getOutputStream()
           
 void init()
          Run all initialization code.
 void providerReady()
          called when provider is ready
protected  void setProviderStatus(int _status)
          Sets the status of the layer.
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
behavesLike, close, closeQuiet, finalize, find, getProviderException, getProviderStackTrace, getProviderStatus, getTransportName, handleEvent, handleEvent, instanceOf, isKindOf, isOpen, isReady, providerStatusString, recipientReady, sendDown, sendUp, serialize, setClient, setEventHandler, setProvider, 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

toClient

SbPipe toClient

toClientThread

ToClientThread toClientThread

fromClientStream

SbClientOutputStream fromClientStream

inputQueue

BlockingQueue inputQueue
Constructor Detail

SbClientStreamsLayer

public SbClientStreamsLayer(SbAsyncTransportProvider _below)
Method Detail

getOutputStream

public java.io.OutputStream getOutputStream()

getInputStream

public java.io.InputStream getInputStream()

init

public void init()
Description copied from class: SbLayer
Run all initialization code. No messages should be sent prior to init() being called. Don't call lower layer until ready to receive messages.

Specified by:
init in interface SbProvider
Overrides:
init in class SbLayer

_close

public void _close()
Description copied from class: SbLayer
Closes this layer and all layers underneath it.

Overrides:
_close in class SbLayer

clientStreamsSendDown

protected void clientStreamsSendDown(java.lang.Object o)

providerReady

public void providerReady()
Description copied from interface: SbClient
called when provider is ready

Specified by:
providerReady in interface SbClient
Overrides:
providerReady in class SbLayer

setProviderStatus

protected void setProviderStatus(int _status)
Description copied from class: SbLayer
Sets the status of the layer. If the status specified is not what the previous status was, then, the layer will notify the layer client to handle the event.

Overrides:
setProviderStatus in class SbLayer
Parameters:
_status - the new layer status

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

getLayerType

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


Copyright (c) 2002-2003 New York University RLAB