public class RpcHostedService extends AbstractHostedConnectionService
| Constructor and Description |
|---|
RpcHostedService()
Creates a new RPC host service that can be registered
with the Network server and will automatically 'host'
RPC services and each new network connection.
|
RpcHostedService(boolean autoHost)
Creates a new RPC host service that can be registered
with the Network server and will optionally 'host'
RPC services and each new network connection depending
on the specified 'autoHost' flag.
|
| Modifier and Type | Method and Description |
|---|---|
RpcConnection |
getRpcConnection(HostedConnection hc)
Retrieves the RpcConnection for the specified HostedConnection
if that HostedConnection has had RPC services started using
startHostingOnConnection() (or via autohosting).
|
protected void |
onInitialize(HostedServiceManager serviceManager)
Used internally to set up the message delegator that will
handle HostedConnection specific messages and forward them
to that connection's RpcConnection.
|
void |
startHostingOnConnection(HostedConnection hc)
Sets up RPC hosting services for the hosted connection allowing
getRpcConnection() to return a valid RPC connection object.
|
void |
stopHostingOnConnection(HostedConnection hc)
Removes any RPC hosting services associated with the specified
connection.
|
void |
terminate(HostedServiceManager serviceManager)
Used internally to remove the message delegator from the
server.
|
connectionAdded, connectionRemoved, getAutoHost, setAutoHostgetServergetService, getServiceManager, initialize, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitialize, start, stoppublic RpcHostedService()
public RpcHostedService(boolean autoHost)
protected void onInitialize(HostedServiceManager serviceManager)
onInitialize in class AbstractService<HostedServiceManager>public RpcConnection getRpcConnection(HostedConnection hc)
public void startHostingOnConnection(HostedConnection hc)
startHostingOnConnection in class AbstractHostedConnectionServicepublic void stopHostingOnConnection(HostedConnection hc)
stopHostingOnConnection in class AbstractHostedConnectionServicepublic void terminate(HostedServiceManager serviceManager)
terminate in interface HostedServiceterminate in interface Service<HostedServiceManager>terminate in class AbstractService<HostedServiceManager>