All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.ConnectionEndpoint

java.lang.Object
   |
   +----sun.server.EndpointDescriptor
           |
           +----sun.server.ConnectionEndpoint

public class ConnectionEndpoint
extends EndpointDescriptor
ConnectionEndpoint is a connection descriptor that exposes all the configuration that a standard Java connection-based service can support. For now, that means it exposes TCP configuration.


Variable Index

 o backlogPropName
Key for value controlling connection setup backlog.
 o interfacePropName
Key for value controlling which interface(s) are used
 o portPropName
Key for value controlling which port is used

Constructor Index

 o ConnectionEndpoint()

Method Index

 o getAdminAppletClass()
Placeholder for the hook to administer these objects.
 o getCriticalKeys()
Lists the keys which initializeDescriptor absolutely requires to be made available to it.
 o getDefault(Object)
Returns the default value of a given key.
 o getDescriptorKeys()
Lists the keys understood by initializeDescriptor; these include ones which have default values, as well as ones which do not have default values.
 o getPort()
Get the endpoint's port.
 o getServerSocket(Service)
Returns a server socket satisfying the constraints of the descriptor.
 o getServerSocket(String, int, int, ServiceConfiguration)
Entry point which will usually be overridden by subclasses.

Variables

 o backlogPropName
  public final static String backlogPropName
Key for value controlling connection setup backlog.

 o interfacePropName
  public final static String interfacePropName
Key for value controlling which interface(s) are used

 o portPropName
  public final static String portPropName
Key for value controlling which port is used

Constructors

 o ConnectionEndpoint
  public ConnectionEndpoint()

Methods

 o getServerSocket
  public ServerSocket getServerSocket(Service service) throws IOException, ConfigurationException
Returns a server socket satisfying the constraints of the descriptor. All connection based services support the standard socket model of service establishment, where a passive server thread waits for connections to be established to it by clients.

NOTE: This operation is specific to connection style endpoints. Datagram and other styles of endpoints will have their own methods for accessing network services.

Throws: IOException
if there's a network related problem
Throws: ConfigurationException
if the configuration information is problematic
 o getServerSocket
  protected ServerSocket getServerSocket(String host,
                                         int port,
                                         int backlog,
                                         ServiceConfiguration config) throws IOException, ConfigurationException
Entry point which will usually be overridden by subclasses. This returns a socket, assuming that an interface name (which may be "*", indicating any interface may be used) and a port number are sufficient to identify it.

Parameters:
host - name of the interface on which to offer service, or "*" if the service is to be offered on all interfaces of a multihomed host
port - port number to use for this service.
backlog - how many network connections to queue up in the system infrastructure.
Throws: ConfigurationException
if the configuration information is problematic
 o getPort
  public int getPort() throws ConfigurationException
Get the endpoint's port. This is looked up from the properties if necessary.

Returns:
the port number
Throws: ConfigurationException
if the port is not a valid number
 o getCriticalKeys
  public Vector getCriticalKeys()
Lists the keys which initializeDescriptor absolutely requires to be made available to it. All other keys have default values. Note that subclasses may provide defaults for values that superclasses require.

Overrides:
getCriticalKeys in class EndpointDescriptor
 o getDescriptorKeys
  public Vector getDescriptorKeys()
Lists the keys understood by initializeDescriptor; these include ones which have default values, as well as ones which do not have default values.

Overrides:
getDescriptorKeys in class EndpointDescriptor
 o getDefault
  public Object getDefault(Object key)
Returns the default value of a given key.

Parameters:
key - identifies which default value is requested
Overrides:
getDefault in class EndpointDescriptor
 o getAdminAppletClass
  public String getAdminAppletClass()
Placeholder for the hook to administer these objects.

Overrides:
getAdminAppletClass in class EndpointDescriptor

All Packages  Class Hierarchy  This Package  Previous  Next  Index