|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.infoengine.au.NamingService
public class NamingService
This class provides a registry that associates Info*Engine services with their network addresses and/or implementation classes. It obtains information from static property files and/or network resources accessed via HTTP or LDAP. Standalone applications should use one of its static factory methods at startup time to initialize the registry.
| Method Summary | |
|---|---|
static void |
addService(java.lang.String serviceName,
com.infoengine.object.ObjectDestination dest)
Adds an entry to the service registry. |
static java.util.Enumeration |
getAllAddresses(java.lang.String serviceName)
Return all of the registry entries associated with a named service. |
static java.net.Socket |
getConnection(java.lang.String serviceName)
Returns a socket connected to a named service. |
static java.lang.String |
getDirectoryProvider()
Returns the URI of the directory service provider currently being used by the naming service. |
static java.lang.String |
getDomainBase()
Returns the directory service domain base currently being used by the naming service. |
static com.infoengine.au.IEProperties |
getIEProperties()
Obtain, and create if necessary, the IEProperties object used by this JVM. |
static NamingService |
getInstance()
Return the naming service instance most recently created by one of the static factory methods. |
static java.lang.String |
getLocalServiceDN(java.lang.String serviceName)
Returns the distinguished name of the directory entry registered for a local service. |
java.util.Properties |
getProperties()
Returns the properties object currently being used by the NamingService instance. |
static java.lang.String |
getPropertySource()
Returns the URI specifying the source of the configuration properties currently being used by the naming service. |
static java.lang.String |
getSearchBase()
Returns the directory service search base currently being used by the naming service. |
static com.infoengine.object.ObjectDestination |
getService(java.lang.String serviceName)
Return one of the registry entries associated with a named service. |
static com.infoengine.object.ObjectServiceCache |
getServiceCache()
|
static int |
getServiceCacheTimeToLive()
|
static java.lang.String |
getServiceName()
Returns the name of the NamingService service. |
static java.util.Enumeration |
getServicePropertyNames(java.lang.String serviceName)
Returns an enumeration of the service-specific property names defined for a specific service. |
static java.lang.String |
getVMName()
Returns the name currently set for this virtual machine. |
static boolean |
isLocalService(java.lang.String dn)
Determines whether a specific directory distinguished name references a service registered in this virtual machine. |
static void |
main(java.lang.String[] args)
When initiated via command line, the naming service operates as a utility that can initiate other programs defined by naming service launch properties. |
static NamingService |
newInstance()
Return a naming service instance with an uninitialized registry. |
static NamingService |
newInstance(java.lang.String resource)
Return a naming service instance providing access to a registry that is initialized from a static properties file and/or a network resource obtained using HTTP or LDAP. |
static NamingService |
newInstance(java.lang.String serviceName,
java.util.Properties props)
Deprecated. |
static NamingService |
newInstance(java.lang.String serviceName,
java.lang.String resource)
Return a naming service instance providing access to a registry that is initialized from a static properties file and/or a network resource obtained using HTTP or LDAP. |
static NamingService |
newInstance(java.lang.String serviceName,
java.lang.String resource,
java.lang.String[] args)
Return a naming service instance providing access to a registry that is initialized from a static properties file and/or a network resource obtained using HTTP or LDAP. |
void |
refreshProperties()
|
static void |
registerLocalService(java.lang.String serviceName,
java.lang.String dn)
Registers a service name and the distinguished name of its directory entry as a local service. |
void |
reinitialize()
|
static void |
setGlobalProperties()
Sets global properties for the VM based upon the VM name. |
static void |
setGlobalProperties(java.lang.String propPrefix)
Deprecated. |
static void |
setServiceCacheTimeToLive(int minutes)
|
static void |
setVMName(java.lang.String name)
Set the name of this virtual machine. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static NamingService newInstance()
public static NamingService newInstance(java.lang.String resource)
throws java.io.IOException,
java.io.FileNotFoundException,
java.net.MalformedURLException,
com.infoengine.au.NamingServiceException
resource - A file pathname or file URL referencing a property
file in the local file system, or an HTTP or LDAP URL
referencing a network resource containing property
definitions.
java.io.IOException - if an I/O error prevents properties from
being accessed or read.
java.io.FileNotFoundException - if a specified property file or
network resource does not exist.
java.net.MalformedURLException - if an HTTP or LDAP URL has incorrect
syntax.
com.infoengine.au.NamingServiceException - if no service-specific properties
are defined.
public static NamingService newInstance(java.lang.String serviceName,
java.lang.String resource)
throws java.io.IOException,
java.io.FileNotFoundException,
java.net.MalformedURLException,
com.infoengine.au.NamingServiceException
serviceName - The name of the naming service itself. This name
is used as the prefix of property names defined
in a property file or network property resource.resource - A file pathname or file URL referencing a property
file in the local file system, or an HTTP or LDAP URL
referencing a network resource containing property
definitions.
java.io.IOException - if an I/O error prevents properties from
being accessed or read.
java.io.FileNotFoundException - if a specified property file or
network resource does not exist.
java.net.MalformedURLException - if an HTTP or LDAP URL has incorrect
syntax.
com.infoengine.au.NamingServiceException - if no service-specific properties
are defined.
public static NamingService newInstance(java.lang.String serviceName,
java.lang.String resource,
java.lang.String[] args)
throws java.io.IOException,
java.io.FileNotFoundException,
java.net.MalformedURLException,
com.infoengine.au.NamingServiceException
serviceName - The name of the naming service itself. This name
is used as the prefix of property names defined
in a property file or network property resource.resource - A file pathname or file URL referencing a property
file in the local file system, or an HTTP or LDAP URL
referencing a network resource containing property
definitions.args - An array of String arguments, usually passed from
a command line to the main method of a program.
java.io.IOException - if an I/O error prevents properties from
being accessed or read.
java.io.FileNotFoundException - if a specified property file or
network resource does not exist.
java.net.MalformedURLException - if an HTTP or LDAP URL has incorrect
syntax.
com.infoengine.au.NamingServiceException - if no service-specific properties are defined.
public static NamingService newInstance(java.lang.String serviceName,
java.util.Properties props)
throws com.infoengine.au.NamingServiceException
serviceName - The name of the naming service itself. This name
is used as the prefix of property names defined
in a Properties object.props - The Properties object from which to initialize the
registry.
com.infoengine.au.NamingServiceException - if no service-specific properties
are defined.public static void setVMName(java.lang.String name)
name - The new name to set for the virtual machine.public static java.lang.String getVMName()
public static NamingService getInstance()
public static java.lang.String getDirectoryProvider()
public static java.lang.String getSearchBase()
public static java.lang.String getServiceName()
public static java.lang.String getDomainBase()
public static java.lang.String getPropertySource()
public static java.util.Enumeration getServicePropertyNames(java.lang.String serviceName)
serviceName - The name of the service for which to return
property names
public static com.infoengine.object.ObjectDestination getService(java.lang.String serviceName)
throws com.infoengine.au.NamingServiceException
serviceName - The name of the service.
com.infoengine.au.NamingServiceException - if the service is unknown or
some other exception prevents it from being looked up.
public static void registerLocalService(java.lang.String serviceName,
java.lang.String dn)
serviceName - The name of the local service.dn - The distinguished name of the directory entry that describes
the service.public static java.lang.String getLocalServiceDN(java.lang.String serviceName)
serviceName - The name of the local service.
public static boolean isLocalService(java.lang.String dn)
throws com.infoengine.au.NamingServiceException
dn - The distinguished name to test.
com.infoengine.au.NamingServiceException - if it can not be determined whether
or not a distinguished name matches a locally registered
service.
public static java.util.Enumeration getAllAddresses(java.lang.String serviceName)
throws com.infoengine.au.NamingServiceException
serviceName - The name of the service for which to return all
registry entries.
com.infoengine.au.NamingServiceException - if the service is unknown or
some other exception prevents it from being looked up.
public static java.net.Socket getConnection(java.lang.String serviceName)
throws com.infoengine.au.NamingServiceException
serviceName - The name of the service to which a network
connection is requested.
com.infoengine.au.NamingServiceException - if the specified service name is
unknown or a network connection can not be established
to the service.
public static void addService(java.lang.String serviceName,
com.infoengine.object.ObjectDestination dest)
serviceName - The name of the service for which to add a
registry entry.dest - The registry entry.public static void setGlobalProperties()
public static void setGlobalProperties(java.lang.String propPrefix)
propPrefix - The property name prefix of service-specific
properties.
public void reinitialize()
throws com.infoengine.au.NamingServiceException
com.infoengine.au.NamingServiceExceptionpublic java.util.Properties getProperties()
public static com.infoengine.au.IEProperties getIEProperties()
public static void main(java.lang.String[] args)
public void refreshProperties()
refreshProperties in interface com.infoengine.au.PropertyListenerpublic static void setServiceCacheTimeToLive(int minutes)
public static int getServiceCacheTimeToLive()
public static com.infoengine.object.ObjectServiceCache getServiceCache()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||