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 setup 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, setAutoHost
getServer
getService, getServiceManager, initialize, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initialize, start, stop
public 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 AbstractHostedConnectionService
public void stopHostingOnConnection(HostedConnection hc)
stopHostingOnConnection
in class AbstractHostedConnectionService
public void terminate(HostedServiceManager serviceManager)
terminate
in interface HostedService
terminate
in interface Service<HostedServiceManager>
terminate
in class AbstractService<HostedServiceManager>