public class WebHubProfile extends Object implements HubProfile, ConfigHubProfile
Modifier and Type | Class and Description |
---|---|
static class |
WebHubProfile.ServerFactory
Creates and configures the HTTP server on which the Web Profile resides.
|
Constructor and Description |
---|
WebHubProfile()
Constructs a profile with default configuration.
|
WebHubProfile(WebHubProfile.ServerFactory serverFactory,
ClientAuthorizer auth,
MessageRestriction mrestrict,
KeyGenerator keyGen,
boolean controlUrls)
Constructs a profile with configuration options.
|
Modifier and Type | Method and Description |
---|---|
static KeyGenerator |
createKeyGenerator()
Convenience method to return a new key generator
suitable for use with a WebHubProfile.
|
JToggleButton.ToggleButtonModel[] |
getConfigModels()
Returns some toggle button models for hub profile configuration.
|
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.
|
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 WebHubProfile(WebHubProfile.ServerFactory serverFactory, ClientAuthorizer auth, MessageRestriction mrestrict, KeyGenerator keyGen, boolean controlUrls)
serverFactory
- factory for server providing HTTP
and XML-RPC implementationauth
- client authorizer implementationmrestrict
- restriction for permitted outward MTypeskeyGen
- key generator for private keyscontrolUrls
- true iff access to local URLs is to be restrictedpublic WebHubProfile() throws IOException
IOException
public String getProfileName()
HubProfile
getProfileName
in interface HubProfile
getProfileName
in interface ProfileToken
public MessageRestriction getMessageRestriction()
ProfileToken
getMessageRestriction
in interface ProfileToken
public void start(ClientProfile profile) throws IOException
HubProfile
start
in interface HubProfile
profile
- object which can provide hub connectionsIOException
public boolean isRunning()
HubProfile
isRunning
in interface HubProfile
public void stop()
HubProfile
stop
in interface HubProfile
public JToggleButton.ToggleButtonModel[] getConfigModels()
ConfigHubProfile
getConfigModels
in interface ConfigHubProfile
public static KeyGenerator createKeyGenerator()
Copyright © 2008–2024. All rights reserved.