edu.nyu.cs.pdsg.switchboard
Class SbRpcServerThread

java.lang.Object
  extended byjava.lang.Thread
      extended byedu.nyu.cs.pdsg.switchboard.SbRpcServerThread
All Implemented Interfaces:
java.lang.Runnable

public class SbRpcServerThread
extends java.lang.Thread


Field Summary
(package private)  java.net.InetSocketAddress address
          The local host IP to which the served object should be bound address
private  Authorizer authorizer
          The Authorizer used to authorize the other end of the Switchboard connection
private  Credentials credentials
          The credentials of this end of the Switchboard connection
private  java.security.KeyPair keyPair
          The public/private key pair of this end of the Switchboard connection
private  LifetimeManagerFactory lifetimeManagerFactory
          A factory to generate LifetimeManagers on a per-connection basis May be null if there is a value for eventHandlerFactory.
private  long livenessTimeDiff
          Threshold for liveness test: a message of some kind (object delivery or liveness ping) must have been received within this window for the connection to be maintained
(package private)  java.lang.String name
          The name under which the object is bound
private  java.net.ServerSocket serverSocket
          The server socket used to accept connections
(package private)  java.util.HashMap stacks
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private SbRpcServerThread(java.net.InetSocketAddress _address, java.lang.String _name, java.security.KeyPair _keyPair, Authorizer _authorizer, Credentials _credentials, long _livenessTimeDiff)
           
  SbRpcServerThread(java.net.InetSocketAddress _address, java.lang.String _name, java.security.KeyPair _keyPair, Authorizer _authorizer, Credentials _credentials, long _livenessTimeDiff, LifetimeManagerFactory _lifetimeManagerFactory)
          Prepares the thread to accept connections to an object over Switchboard
 
Method Summary
private  void initStacks()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stacks

java.util.HashMap stacks

address

java.net.InetSocketAddress address
The local host IP to which the served object should be bound address


name

java.lang.String name
The name under which the object is bound


serverSocket

private java.net.ServerSocket serverSocket
The server socket used to accept connections


keyPair

private java.security.KeyPair keyPair
The public/private key pair of this end of the Switchboard connection


authorizer

private Authorizer authorizer
The Authorizer used to authorize the other end of the Switchboard connection


credentials

private Credentials credentials
The credentials of this end of the Switchboard connection


livenessTimeDiff

private long livenessTimeDiff
Threshold for liveness test: a message of some kind (object delivery or liveness ping) must have been received within this window for the connection to be maintained


lifetimeManagerFactory

private LifetimeManagerFactory lifetimeManagerFactory
A factory to generate LifetimeManagers on a per-connection basis May be null if there is a value for eventHandlerFactory.

Constructor Detail

SbRpcServerThread

private SbRpcServerThread(java.net.InetSocketAddress _address,
                          java.lang.String _name,
                          java.security.KeyPair _keyPair,
                          Authorizer _authorizer,
                          Credentials _credentials,
                          long _livenessTimeDiff)

SbRpcServerThread

public SbRpcServerThread(java.net.InetSocketAddress _address,
                         java.lang.String _name,
                         java.security.KeyPair _keyPair,
                         Authorizer _authorizer,
                         Credentials _credentials,
                         long _livenessTimeDiff,
                         LifetimeManagerFactory _lifetimeManagerFactory)
Prepares the thread to accept connections to an object over Switchboard

Parameters:
_address - the local host IP to which the served object should be bound
_name - the name under which the served object should be bound
_keyPair - the public/private key pair of the serving entity
_authorizer - used to authorize any potential users of the object
_credentials - the credentials presented by the server that clients may use to authorize the server
_livenessTimeDiff - the timeout parameter
_lifetimeManagerFactory - generates Switchboard Event handling code and IncallHandlers on a per-connection basis
Method Detail

initStacks

private void initStacks()

run

public void run()


Copyright (c) 2002-2003 New York University RLAB