public interface Server
Server
element represents the entire Catalina
servlet container. Its attributes represent the characteristics of
the servlet container as a whole. A Server
may contain
one or more Services
, and the top level set of naming
resources.
Normally, an implementation of this interface will also implement
Lifecycle
, such that when the start()
and
stop()
methods are called, all of the defined
Services
are also started or stopped.
In between, the implementation must open a server socket on the port number
specified by the port
property. When a connection is accepted,
the first line is read and compared with the specified shutdown command.
If the command matches, shutdown of the server is initiated.
NOTE - The concrete implementation of this class should
register the (singleton) instance with the ServerFactory
class in its constructor(s).
Modifier and Type | Method and Description |
---|---|
void |
addService(Service service)
Add a new Service to the set of defined Services.
|
Service |
findService(String name)
Return the specified Service (if it exists); otherwise return
null . |
Service[] |
findServices()
Return the set of Services defined within this Server.
|
String |
getInfo()
Return descriptive information about this Server implementation and
the corresponding version number, in the format
<description>/<version> . |
void |
initialize()
Invoke a pre-startup initialization.
|
void |
removeService(Service service)
Remove the specified Service from the set associated from this
Server.
|
String getInfo()
<description>/<version>
.void addService(Service service)
service
- The Service to be addedService findService(String name)
null
.name
- Name of the Service to be returnedService[] findServices()
void removeService(Service service)
service
- The Service to be removedvoid initialize() throws LifecycleException
LifecycleException
- If this server was already initialized.Copyright © 2017 JBoss by Red Hat. All rights reserved.