public abstract class AbsRegistry extends java.lang.Object implements NameService
Modifier | Constructor and Description |
---|---|
protected |
AbsRegistry()
Build a new Registry
|
protected |
AbsRegistry(int defaultPortNumber)
Build a new Registry with a given default port number
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Properties |
getConfigProperties() |
java.lang.String |
getHost() |
int |
getPort()
get port method, get the port for the name service
|
boolean |
isStarted()
isStarted Method, check if a name service is started
|
protected void |
resetStarted()
Registry is stopped
|
void |
setConfigProperties(java.util.Properties p)
Set the configuration properties of the protocol
|
void |
setHost(java.lang.String host)
Set the address to use for bind
|
void |
setPort(int p)
set port method, set the port for the name service
|
protected void |
setStarted()
Registry is started
|
abstract void |
start()
start Method, Start a new NameService or do nothing if the name service
is all ready start
|
abstract void |
stop()
stop Method, Stop a NameService or do nothing if the name service is all
ready stop
|
protected AbsRegistry()
protected AbsRegistry(int defaultPortNumber)
defaultPortNumber
- the default port numberpublic abstract void start() throws NameServiceException
start
in interface NameService
NameServiceException
- if a problem occurepublic abstract void stop() throws NameServiceException
stop
in interface NameService
NameServiceException
- if a problem occurepublic boolean isStarted()
isStarted
in interface NameService
public void setPort(int p)
setPort
in interface NameService
p
- port numberpublic void setHost(java.lang.String host)
setHost
in interface NameService
host
- hostname/ip addresspublic java.lang.String getHost()
getHost
in interface NameService
public int getPort()
getPort
in interface NameService
public void setConfigProperties(java.util.Properties p)
setConfigProperties
in interface NameService
p
- configuration propertiesprotected void setStarted()
protected void resetStarted()
protected java.util.Properties getConfigProperties()