public interface HubService
Modifier and Type | Method and Description |
---|---|
void |
disconnectAll(ProfileToken profileToken)
Forcibly terminates any connections created by a previous call of
register(org.astrogrid.samp.hub.ProfileToken)
with a particular profileToken . |
boolean |
isHubRunning()
Indicates whether this hub service is currently open for operations.
|
HubConnection |
register(ProfileToken profileToken)
Creates a new connection to this hub service, thereby initiating
a new registered client.
|
void |
shutdown()
Tidies up any resources owned by this object.
|
void |
start()
Begin operation.
|
void start()
register(org.astrogrid.samp.hub.ProfileToken)
method should not be
called until the hub has been started.HubConnection register(ProfileToken profileToken) throws SampException
It is the responsibility of the returned connection, not the
user of that connection, to broadcast the various
samp.hub.event.*
notifications at the appropriate times.
Most of the HubConnection
methods are declared to
throw SampException
, however, implementations may
throw unchecked exceptions if that is more convenient;
users of the connection should be prepared to catch these if
they occur.
profileToken
- identifier for the profile acting as gatekeeper
for this connectionSampException
void disconnectAll(ProfileToken profileToken)
register(org.astrogrid.samp.hub.ProfileToken)
with a particular profileToken
.
Any necessary hub events will be sent.profileToken
- previous argument to register
boolean isHubRunning()
start()
and shutdown()
void shutdown()
Copyright © 2008–2024. All rights reserved.