Package com.jme3.network.service
Class ClientServiceManager
java.lang.Object
com.jme3.network.service.ServiceManager<ClientServiceManager>
com.jme3.network.service.ClientServiceManager
Manages ClientServices on behalf of a network Client object.
-
Constructor Summary
ConstructorDescriptionClientServiceManager
(Client client) Creates a new ClientServiceManager for the specified network Client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified ClientService and initializes it.void
addServices
(ClientService... services) Adds the specified services and initializes them.Returns the network Client associated with this ClientServiceManager.protected final ClientServiceManager
Returns 'this' and is what is passed to ClientService.initialize() and ClientService.terminate();void
Removes the specified ClientService from this service manager, stopping and terminating it as required.Methods inherited from class com.jme3.network.service.ServiceManager
addService, getService, getServices, isStarted, removeService, start, stop, terminate, toString
-
Constructor Details
-
ClientServiceManager
Creates a new ClientServiceManager for the specified network Client.
-
-
Method Details
-
getClient
Returns the network Client associated with this ClientServiceManager. -
getParent
Returns 'this' and is what is passed to ClientService.initialize() and ClientService.terminate();- Specified by:
getParent
in classServiceManager<ClientServiceManager>
-
addService
Adds the specified ClientService and initializes it. If the service manager has already been started then the service will also be started. -
addServices
Adds the specified services and initializes them. If the service manager has already been started then the services will also be started. This is a convenience method that delegates to addService(), thus each service will be initialized (and possibly started) in sequence rather than doing them all at the end. -
removeService
Removes the specified ClientService from this service manager, stopping and terminating it as required. If this service manager is in a started state then the service will be stopped. After removal, the service will be terminated.
-