public interface Service
A given JVM can contain any number of Service instances; however, they are completely independent of each other and share only the basic JVM facilities and classes on the system class path.
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.
|
Connector[] |
findConnectors()
Find and return the set of Connectors associated with this Service.
|
NotificationBroadcasterSupport |
getBroadcaster()
Return the
NotificationBroadcasterSupport that sends notification for this Service. |
Container |
getContainer()
Return the
Container that handles requests for all
Connectors associated with this Service. |
String |
getInfo()
Return descriptive information about this Service implementation and
the corresponding version number, in the format
<description>/<version> . |
String |
getName()
Return the name of this Service.
|
Server |
getServer()
Return the
Server with which we are associated (if any). |
void |
initialize()
Invoke a pre-startup initialization.
|
void |
removeConnector(Connector connector)
Remove the specified Connector from the set associated from this
Service.
|
void |
setBroadcaster(NotificationBroadcasterSupport broadcaster)
Set the
NotificationBroadcasterSupport that sends notification for this Service |
void |
setContainer(Container container)
Set the
Container that handles requests for all
Connectors associated with this Service. |
void |
setName(String name)
Set the name of this Service.
|
void |
setServer(Server server)
Set the
Server with which we are associated (if any). |
Container getContainer()
Container
that handles requests for all
Connectors
associated with this Service.void setContainer(Container container)
Container
that handles requests for all
Connectors
associated with this Service.container
- The new ContainerString getInfo()
<description>/<version>
.String getName()
void setName(String name)
name
- The new service nameServer getServer()
Server
with which we are associated (if any).void setServer(Server server)
Server
with which we are associated (if any).server
- The server that owns this ServiceNotificationBroadcasterSupport getBroadcaster()
NotificationBroadcasterSupport
that sends notification for this Service.void setBroadcaster(NotificationBroadcasterSupport broadcaster)
NotificationBroadcasterSupport
that sends notification for this Servicebroadcaster
- The new NotificationBroadcasterSupportvoid addConnector(Connector connector)
connector
- The Connector to be addedConnector[] findConnectors()
void removeConnector(Connector connector) throws LifecycleException
connector
- The Connector to be removedLifecycleException
void initialize() throws LifecycleException
LifecycleException
- If this server was already initialized.Copyright © 2019. All rights reserved.