edu.nyu.cs.pdsg.switchboard.io
Class SbSocketIoLayer

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

public class SbSocketIoLayer
extends SbIoLayer


Field Summary
private  java.lang.String name
           
private  java.io.ObjectInputStream objectIn
           
private  java.io.ObjectOutputStream objectOut
           
private  java.net.Socket socket
           
 boolean superSecretAbortCloseThingie
          Set this to true to make things go boom
private  SbSocketIoLayerThread thread
           
 
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
SbSocketIoLayer(java.net.Socket _socket, java.lang.String _name)
           
 
Method Summary
 void _close()
          Closes this layer and all layers underneath it.
 java.lang.String getLayerType()
           
 java.net.Socket getSocket()
           
 java.lang.String getTransportName()
           
 void init()
          Run all initialization code.
 void threadAction()
           
 void write(java.lang.Object obj)
          Defines the behavior how to deliver an Object to the layer above.
 
Methods inherited from class edu.nyu.cs.pdsg.switchboard.SbLayer
behavesLike, close, closeQuiet, deliver, finalize, find, getProviderException, getProviderStackTrace, getProviderStatus, handleEvent, handleEvent, instanceOf, isKindOf, isOpen, isReady, providerReady, providerStatusString, recipientReady, sendDown, sendUp, serialize, setClient, setEventHandler, setProvider, setProviderStatus, setProviderStatus, setProviderStatusSend, setRecipient, toShortString, toString, unserialize
 
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

name

private java.lang.String name

socket

private java.net.Socket socket

objectIn

private java.io.ObjectInputStream objectIn

objectOut

private java.io.ObjectOutputStream objectOut

thread

private SbSocketIoLayerThread thread

superSecretAbortCloseThingie

public boolean superSecretAbortCloseThingie
Set this to true to make things go boom

Constructor Detail

SbSocketIoLayer

public SbSocketIoLayer(java.net.Socket _socket,
                       java.lang.String _name)
Method Detail

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

write

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

Specified by:
write in interface SbAsyncTransportProvider
Overrides:
write in class SbLayer

getSocket

public java.net.Socket getSocket()

threadAction

public void threadAction()

getLayerType

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

getTransportName

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


Copyright (c) 2002-2003 New York University RLAB