| Modifier and Type | Field and Description |
|---|---|
protected Connector[] |
connectors
The set of Connectors associated with this Service.
|
protected Container |
container
The Container associated with this Service.
|
protected javax.management.ObjectName |
controller |
static boolean |
DELAY_CONNECTOR_STARTUP
Alternate flag to enable delaying startup of connectors in embedded mode.
|
protected java.lang.String |
domain |
protected java.lang.String |
entropy
A String initialization parameter used to increase the entropy of
the initialization of our random number generator.
|
protected java.util.ArrayList<Executor> |
executors |
protected boolean |
initialized
Has this component been initialized?
|
protected Mapper |
mapper
Mapper.
|
protected ServiceMapperListener |
mapperListener
The associated mapper.
|
protected javax.management.MBeanServer |
mserver |
protected javax.management.ObjectName |
oname |
protected java.security.SecureRandom |
random
The random associated with this service.
|
protected java.lang.String |
suffix |
protected java.beans.PropertyChangeSupport |
support
The property change support for this component.
|
protected java.lang.String |
type |
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
StandardService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnector(Connector connector)
Add a new Connector to the set of defined Connectors, and associate it
with this Service's Container.
|
void |
addExecutor(Executor ex)
Adds a named executor to the service
|
void |
addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component.
|
void |
destroy() |
Connector[] |
findConnectors()
Find and return the set of Connectors associated with this Service.
|
Executor[] |
findExecutors()
Retrieves all executors
|
LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
|
javax.management.ObjectName[] |
getConnectorNames() |
Container |
getContainer()
Return the
Container that handles requests for all
Connectors associated with this Service. |
javax.management.ObjectName |
getContainerName() |
java.lang.String |
getDomain() |
java.lang.String |
getEntropy()
Return the entropy increaser value, or compute a semi-useful value
if this String has not yet been set.
|
Executor |
getExecutor(java.lang.String name)
Retrieves executor by name, null if not found
|
java.lang.String |
getInfo()
Return descriptive information about this Service implementation and
the corresponding version number, in the format
<description>/<version>. |
Mapper |
getMapper()
Return the
Mapper that handles mapping for all
Connectors associated with this Service. |
java.lang.String |
getName()
Return the name of this Service.
|
javax.management.ObjectName |
getObjectName() |
java.security.SecureRandom |
getRandom()
Get the global secure random that will be used for this service.
|
Server |
getServer()
Return the
Server with which we are associated (if any). |
void |
init() |
void |
initialize()
Invoke a pre-startup initialization.
|
void |
postDeregister() |
void |
postRegister(java.lang.Boolean registrationDone) |
void |
preDeregister() |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name) |
void |
removeConnector(Connector connector)
Remove the specified Connector from the set associated from this
Service.
|
void |
removeExecutor(Executor ex)
Removes an executor from the service
|
void |
removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component.
|
void |
setContainer(Container container)
Set the
Container that handles requests for all
Connectors associated with this Service. |
void |
setEntropy(java.lang.String entropy)
Set the entropy increaser value.
|
void |
setName(java.lang.String name)
Set the name of this Service.
|
void |
setServer(Server server)
Set the
Server with which we are associated (if any). |
void |
start()
Prepare for the beginning of active use of the public methods of this
component.
|
void |
stop()
Gracefully terminate the active use of the public methods of this
component.
|
java.lang.String |
toString()
Return a String representation of this component.
|
public static final boolean DELAY_CONNECTOR_STARTUP
protected java.beans.PropertyChangeSupport support
protected Connector[] connectors
protected java.util.ArrayList<Executor> executors
protected Container container
protected Mapper mapper
protected ServiceMapperListener mapperListener
protected boolean initialized
protected java.lang.String entropy
protected java.security.SecureRandom random
protected java.lang.String type
protected java.lang.String domain
protected java.lang.String suffix
protected javax.management.ObjectName oname
protected javax.management.ObjectName controller
protected javax.management.MBeanServer mserver
public Container getContainer()
Container that handles requests for all
Connectors associated with this Service.getContainer in interface Servicepublic void setContainer(Container container)
Container that handles requests for all
Connectors associated with this Service.setContainer in interface Servicecontainer - The new Containerpublic Mapper getMapper()
ServiceMapper that handles mapping for all
Connectors associated with this Service.public javax.management.ObjectName getContainerName()
public java.lang.String getInfo()
<description>/<version>.public java.lang.String getName()
public void setName(java.lang.String name)
public Server getServer()
Server with which we are associated (if any).public void setServer(Server server)
Server with which we are associated (if any).public java.lang.String getEntropy()
ServicegetEntropy in interface Servicepublic void setEntropy(java.lang.String entropy)
ServicesetEntropy in interface Serviceentropy - The new entropy increaser valuepublic java.security.SecureRandom getRandom()
Servicepublic void addConnector(Connector connector)
addConnector in interface Serviceconnector - The Connector to be addedpublic javax.management.ObjectName[] getConnectorNames()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to addpublic Connector[] findConnectors()
findConnectors in interface Servicepublic void removeConnector(Connector connector)
removeConnector in interface Serviceconnector - The Connector to be removedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to removepublic java.lang.String toString()
toString in class java.lang.Objectpublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to removepublic void addExecutor(Executor ex)
addExecutor in interface Serviceex - Executorpublic Executor[] findExecutors()
findExecutors in interface Servicepublic Executor getExecutor(java.lang.String name)
getExecutor in interface Servicename - Stringpublic void removeExecutor(Executor ex)
removeExecutor in interface Serviceex - Executorpublic void start()
throws LifecycleException
start in interface LifecycleLifecycleException - if this component detects a fatal error
that prevents this component from being usedpublic void stop()
throws LifecycleException
stop in interface LifecycleLifecycleException - if this component detects a fatal error
that needs to be reportedpublic void initialize()
throws LifecycleException
initialize in interface ServiceLifecycleException - If this server was already initialized.public void destroy()
throws LifecycleException
LifecycleExceptionpublic void init()
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationpublic void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistration