|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnenok.Services
public class Services
This utility class deals with Nenok services. It provides static methods to start, localize & terminate
Nenok Processor
s. Furthermore, localization of Registry
services is an important task of
this class, which is implemented as multicast localization. To assert best possible lookup times a static
JINI LookupCache
is used.
Constructor Summary | |
---|---|
Services()
|
Method Summary | |
---|---|
static boolean |
destroyAllProcessors()
Destroy all processors that were started from this class. |
static boolean |
destroyProcessor(Processor proc)
Destroys a given processor. |
static boolean |
destroyProcessor(net.jini.id.Uuid pid)
Destroys a given processor. |
static Processor |
findProcessor(Locator locator)
Finds the processor that hosts the valuation referenced by the given locator. |
static Processor |
findProcessor(net.jini.id.Uuid pid)
Finds the processor with the given ID, running of the given host. |
static Registry |
findRegistry()
Finds an arbitrary registry service via multicast. |
static Registry |
findRegistry(String... urls)
Finds an arbitrary registry service via unicast. |
static Processor |
startLocalProcessor()
Starts a new local processor thread. |
static Processor |
startProcessor()
Deprecated. Use startRemoteProcessor() instead. |
static Processor |
startRemoteProcessor()
Starts a new remote processor instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Services()
Method Detail |
---|
public static Processor findProcessor(Locator locator)
locator
- The locator whose processor is to localize.
null
, if locatozation failed.public static Processor findProcessor(net.jini.id.Uuid pid)
pid
- The processor identifier.
null
, if locatozation failed.public static Processor startProcessor() throws UnknownHostException
startRemoteProcessor()
instead.
UnknownHostException
- Exception thrown when the machine's host name cannot be localized.public static Processor startRemoteProcessor() throws UnknownHostException
UnknownHostException
- Exception thrown when the machine's host name cannot be localized.public static Processor startLocalProcessor()
public static boolean destroyProcessor(net.jini.id.Uuid pid)
pid
- The identifier of the processor to destroy.
true
, if the processor has been destroyed successfully.public static boolean destroyProcessor(Processor proc)
proc
- The processor to destroy.
true
, if the processor has been destroyed successfully.public static boolean destroyAllProcessors()
true
, if all processors have been destroyed successfully.public static Registry findRegistry()
null
, if localization failed.public static Registry findRegistry(String... urls) throws MalformedURLException, UnknownHostException
urls
- URLs for unicast localization beyond subnets.
null
, if localization failed.
MalformedURLException
- Invalide URL argument.
UnknownHostException
- URL not resolvable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |