public class StandardHubProfile extends Object implements HubProfile
| Constructor and Description |
|---|
StandardHubProfile()
Constructs a hub profile with default configuration.
|
StandardHubProfile(SampXmlRpcClientFactory xClientFactory,
SampXmlRpcServerFactory xServerFactory,
File lockfile,
String secret)
Constructs a hub profile with given configuration information.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createSecret()
Returns a string suitable for use as a Standard Profile Secret.
|
LockInfo |
getLockInfo()
Returns the lockfile information associated with this object.
|
MessageRestriction |
getMessageRestriction()
Returns a MessageRestriction object which controls what messages
may be sent by clients registering under ths profile.
|
String |
getProfileName()
Returns the name of this profile.
|
boolean |
isRunning()
Indicates whether this profile is currently running.
|
URL |
publishLockfile()
Returns an HTTP URL at which the lockfile for this hub can be found.
|
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.
|
public StandardHubProfile(SampXmlRpcClientFactory xClientFactory, SampXmlRpcServerFactory xServerFactory, File lockfile, String secret)
lockfile is null, no lockfile will
be written at hub startup.xClientFactory - XML-RPC client factory implementationxServerFactory - XML-RPC server implementationlockfile - location to use for hub lockfile, or nullsecret - value for samp.secret lockfile keypublic StandardHubProfile()
throws IOException
IOExceptionpublic String getProfileName()
HubProfilegetProfileName in interface HubProfilegetProfileName in interface ProfileTokenpublic MessageRestriction getMessageRestriction()
ProfileTokengetMessageRestriction in interface ProfileTokenpublic void start(ClientProfile profile) throws IOException
HubProfilestart in interface HubProfileprofile - object which can provide hub connectionsIOExceptionpublic boolean isRunning()
HubProfileisRunning in interface HubProfilepublic void stop()
HubProfilestop in interface HubProfilepublic LockInfo getLockInfo()
public URL publishLockfile() throws IOException
Use this with care; publishing your lockfile means that other people can connect to your hub and potentially do disruptive things.
IOExceptionpublic static String createSecret()
Copyright © 2008–2024. All rights reserved.