edu.nyu.cs.pdsg.handshake
Class SecureChannelFactory

java.lang.Object
  extended byedu.nyu.cs.pdsg.handshake.SecureChannelFactory
Direct Known Subclasses:
GenericPKISecureChannelFactory

public abstract class SecureChannelFactory
extends java.lang.Object

The factory class for the channel manager


Field Summary
protected static SecureChannelFactory defaultFactory
           
protected static java.util.HashMap factories
           
 
Constructor Summary
SecureChannelFactory()
           
 
Method Summary
static void addFactoryClass(java.lang.String type, SecureChannelFactory factory)
          Make Handshake aware of a new type of factory, defined by the given name, and without setting this class to be the default factory class.
abstract  SecureChannel channel()
          Allocate and return a secure channel of the type produced by this factory instance;
static SecureChannelFactory instance()
          Get a SecureChannelFactory instance
static SecureChannelFactory instance(java.lang.String type)
          Get a SecureChannelFactory instance
static void setFactoryClass(java.lang.String type, SecureChannelFactory factory)
          Make Handshake aware of a new type of factory, defined by the given name, and set this class to be the default factory class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factories

protected static java.util.HashMap factories

defaultFactory

protected static SecureChannelFactory defaultFactory
Constructor Detail

SecureChannelFactory

public SecureChannelFactory()
Method Detail

channel

public abstract SecureChannel channel()
Allocate and return a secure channel of the type produced by this factory instance;

Returns:
an uninitialized SecureChannel

setFactoryClass

public static void setFactoryClass(java.lang.String type,
                                   SecureChannelFactory factory)
Make Handshake aware of a new type of factory, defined by the given name, and set this class to be the default factory class.

Parameters:
type - The name to give this new factory class
factory - The factory class

addFactoryClass

public static void addFactoryClass(java.lang.String type,
                                   SecureChannelFactory factory)
Make Handshake aware of a new type of factory, defined by the given name, and without setting this class to be the default factory class.

Parameters:
type - The name to give this new factory class
factory - The factory class

instance

public static SecureChannelFactory instance()
Get a SecureChannelFactory instance

Returns:
an instance of the default factory class

instance

public static SecureChannelFactory instance(java.lang.String type)
Get a SecureChannelFactory instance

Returns:
an instance of the selected factory class


Copyright (c) 2002-2003 New York University RLAB