All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.EndpointDescriptor
java.lang.Object
|
+----sun.server.EndpointDescriptor
- public abstract class EndpointDescriptor
- extends Object
Endpoint descriptors are used to administer network services. Each
network service is made available at a particular transport address,
and with certain characteristics. Those characteristics are described
using an endpoint descriptor, administered as part of the service.
Characteristics of a transport endpoint include addressing information,
some kinds of security characteristics, compression, bandwidth, latency,
and more. In particular, there are different kinds of transport endpoints,
corresponding to different qualities of service, such as:
- Connection style service: The most commonly used
quality of service, providing at-most-once message delivery,
with order preserved and no duplicates. This is a pairwise
communication, for example client-to-server or peer-to-peer.
- Datagram style service: Used sometimes by system
services, messages may be deleted, duplicated, and delivered out
of order. This is also a pairwise service.
- Multicast service: This is like datagram service,
but interactions normally have more than two participants. This
is a generalization of "broadcast" service, as well as "manycast".
Higher level aspects of the configuration for a network service are
administered using different interfaces. Endpoint Descriptors only affect
transport level characteristics; application level protocols usually
depend on having a particular quality of service from their transport
level protocol(s).
The intent of this framework is to let subclasses control their own
persistence (or lack thereof), as part of being the locus for all
integrity checking policies. The current use of "ServiceConfiguration"
prevents that, but that feature should reappear in the future.
-
EndpointDescriptor()
-
-
fromConfig(ServiceConfiguration, String)
- The default endpoint representation is currently a property set
with a distinguished key "endpoint.class", used to identify
which endpoint class is used.
-
getAdminAppletClass()
- Hook to administer these objects.
-
getCriticalKeys()
- Lists the keys which initializeDescriptor absolutely
requires to be made available to it.
-
getDefault(Object)
- Returns the default value of a given key.
-
getDescriptorKeys()
- Lists the keys understood by initializeDescriptor,
including ones which have default values.
-
getValue(Object)
- Returns the current value corresponding to a given key.
-
initialize(Properties)
- Initializes the descriptor from the key/value pairs found in a
hashtable.
-
saveProperty(String, String)
- Saves persistent state associated with a given key.
-
setValue(Object, Object)
- Sets the value corresponding to a given settable key.
EndpointDescriptor
public EndpointDescriptor()
fromConfig
public static EndpointDescriptor fromConfig(ServiceConfiguration config,
String endpoint) throws ConfigurationException
- The default endpoint representation is currently a property set
with a distinguished key "endpoint.class", used to identify
which endpoint class is used. An instance of that classs is
created and then initialized using the properties. When used
with ServiceConfiguration, this must be a property "group".
- Parameters:
- config - set of property files to choose from
- endpoint - which one of those property files to use
- Throws: ConfigurationException
- if the configuration data
is invalid
getAdminAppletClass
public abstract String getAdminAppletClass()
- Hook to administer these objects. This returns the name of an
applet class which can be instantiated within a GUI framework,
and which then understands how to administer this particular
kind of object.
getCriticalKeys
public abstract 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 provide.
getDescriptorKeys
public abstract Vector getDescriptorKeys()
- Lists the keys understood by initializeDescriptor,
including ones which have default values.
getDefault
public abstract Object getDefault(Object key)
- Returns the default value of a given key.
- Parameters:
- key - identifies which default value is requested
getValue
public abstract Object getValue(Object key)
- Returns the current value corresponding to a given key.
- Parameters:
- key - identifies which current value is requested
initialize
protected abstract void initialize(Properties props) throws ConfigurationException
- Initializes the descriptor from the key/value pairs found in a
hashtable. The keys and values understood by the descriptor are
specific to the kind of connection, although conventions are
defined for the following string-valued keys:
- port ... The value is a number describing the
the host-specific part of the server's address, such as the
TCP port. This value must always be provided.
- hostname ... If provided, this describes which
of multiple available network interfaces to use. This value
is only meaningful in environments which support "multihoming".
It may be used to provide selective service visibility, such
as offering a service on only one side of a firewall.
Keys provided in the hashtable must be understood by the
descriptor; it is an error to provide keys which are not
explicitly supported by the descriptor. Similarly, it is
an error not to provide values for the "critical" keys.
- Parameters:
- props - a set of key/value pairs used to initialize the
descriptor
- Throws: ConfigurationException
- indicates that the data
in the hashtable has problems.
- See Also:
- getDescriptorKeys, getCriticalKeys
setValue
public abstract void setValue(Object key,
Object value) throws IOException
- Sets the value corresponding to a given settable key. The individual
endpoint will report errors when these keys or values are not valid.
- Parameters:
- key - the key used to look up the value
- value - the value being set
- Throws: IOException
- if the property can't be saved
saveProperty
protected void saveProperty(String propKey,
String encodedValue) throws IOException
- Saves persistent state associated with a given key. This is for
use only by the endpoint implementations, since for now they do
not have the ability to affect their own persistence models.
- Parameters:
- propKey - string form of key used to look up the value
- encodedValue - string-encoded form of the value being set
- Throws: IOException
- if the property can't be saved
All Packages Class Hierarchy This Package Previous Next Index