Package org.astrogrid.samp.hub
Interface HubProfile
-
- All Superinterfaces:
ProfileToken
- All Known Subinterfaces:
ConfigHubProfile
- All Known Implementing Classes:
StandardHubProfile
,WebHubProfile
public interface HubProfile extends ProfileToken
Defines a hub profile. This profile allows registration and deregistration of clients to a given provider of hub connections, using some profile-specific transport and authentication arrangements. Multiple profiles may be attached to a single connection supplier at any time, and may be started and stopped independently of each other. The connection supplier is typically a hub service running in the same JVM, but may also be a client-side connection to a hub. A profile should be able to undergo multiple start/stop cycles.- Since:
- 31 Jan 2011
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getProfileName()
Returns the name of this profile.boolean
isRunning()
Indicates whether this profile is currently running.void
start(ClientProfile profile)
Starts this profile's activity allowing access to a given supplier of hub connections.void
stop()
Ends this profile's activity on behalf of the hub.-
Methods inherited from interface org.astrogrid.samp.hub.ProfileToken
getMessageRestriction
-
-
-
-
Method Detail
-
start
void start(ClientProfile profile) throws java.io.IOException
Starts this profile's activity allowing access to a given supplier of hub connections.- Parameters:
profile
- object which can provide hub connections- Throws:
java.io.IOException
-
isRunning
boolean isRunning()
Indicates whether this profile is currently running.- Returns:
- true iff profile is running
-
stop
void stop() throws java.io.IOException
Ends this profile's activity on behalf of the hub. Any resources associated with the profile should be released. This does not include messaging registered clients about profile termination; that should be taken care of by the user of this profile.- Throws:
java.io.IOException
-
getProfileName
java.lang.String getProfileName()
Returns the name of this profile.- Specified by:
getProfileName
in interfaceProfileToken
- Returns:
- profile name, usually one word
-
-