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
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 JToggleButton.ToggleButtonModel[] getConfigModels()
ConfigHubProfilegetConfigModels in interface ConfigHubProfilepublic static KeyGenerator createKeyGenerator()
Copyright © 2008–2024. All rights reserved.