Package org.astrogrid.samp.web
Class WebHubProfileFactory
- java.lang.Object
-
- org.astrogrid.samp.web.WebHubProfileFactory
-
- All Implemented Interfaces:
HubProfileFactory
public class WebHubProfileFactory extends java.lang.Object implements HubProfileFactory
HubProfileFactory implementation for Web Profile.- Since:
- 2 Feb 2011
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
authUsage_
private static java.lang.String
corsUsage_
private static java.lang.String
flashUsage_
private static java.lang.String
logUsage_
private static java.lang.String
restrictMtypeUsage_
private static java.lang.String
silverlightUsage_
private static java.lang.String
urlcontrolUsage_
-
Constructor Summary
Constructors Constructor Description WebHubProfileFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HubProfile
createHubProfile(java.util.List flagList)
Creates a HubProfile perhaps configured using a supplied list of flags.java.lang.String[]
getFlagsUsage()
Returns an array of strings, each describing one command-line flag which will be consumed by thecreateProfile
method.java.lang.Class
getHubProfileClass()
Returns a HubProfile subclass with a no-arg constructor which, when invoked, will produce a basic instance of the HubProfile represented by this factory.java.lang.String
getName()
Returns "web".
-
-
-
Field Detail
-
logUsage_
private static final java.lang.String logUsage_
- See Also:
- Constant Field Values
-
authUsage_
private static final java.lang.String authUsage_
- See Also:
- Constant Field Values
-
corsUsage_
private static final java.lang.String corsUsage_
- See Also:
- Constant Field Values
-
flashUsage_
private static final java.lang.String flashUsage_
- See Also:
- Constant Field Values
-
silverlightUsage_
private static final java.lang.String silverlightUsage_
- See Also:
- Constant Field Values
-
urlcontrolUsage_
private static final java.lang.String urlcontrolUsage_
- See Also:
- Constant Field Values
-
restrictMtypeUsage_
private static final java.lang.String restrictMtypeUsage_
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns "web".- Specified by:
getName
in interfaceHubProfileFactory
- Returns:
- short name
-
getFlagsUsage
public java.lang.String[] getFlagsUsage()
Description copied from interface:HubProfileFactory
Returns an array of strings, each describing one command-line flag which will be consumed by thecreateProfile
method.- Specified by:
getFlagsUsage
in interfaceHubProfileFactory
- Returns:
- array of plain-text strings suitable for use as part of a usage message
-
createHubProfile
public HubProfile createHubProfile(java.util.List flagList) throws java.io.IOException
Description copied from interface:HubProfileFactory
Creates a HubProfile perhaps configured using a supplied list of flags. Any flags which match those described by theHubProfileFactory.getFlagsUsage()
command are used for configuration of the returned hub, and must be removed from theflagList
list. Unrecognised flags should be ignored and left in the list. Flags which are recognised but badly formed should raise a RuntimeException with a helpful message.- Specified by:
createHubProfile
in interfaceHubProfileFactory
- Parameters:
flagList
- mutable list of Strings giving command-ilne flags, some of which may be intended for configuring a profile- Returns:
- new profile
- Throws:
java.io.IOException
-
getHubProfileClass
public java.lang.Class getHubProfileClass()
Description copied from interface:HubProfileFactory
Returns a HubProfile subclass with a no-arg constructor which, when invoked, will produce a basic instance of the HubProfile represented by this factory. The instance thus produced will typically be similar to that produced by invokingHubProfileFactory.createHubProfile(java.util.List)
with an empty flag list.- Specified by:
getHubProfileClass
in interfaceHubProfileFactory
- Returns:
- HubProfile subclass with a public no-arg constructor
-
-