Class StandardHubProfileFactory

java.lang.Object
org.astrogrid.samp.xmlrpc.StandardHubProfileFactory
All Implemented Interfaces:
HubProfileFactory

public class StandardHubProfileFactory extends Object implements HubProfileFactory
HubProfileFactory implementation for Standard Profile.
Since:
31 Jan 2011
Author:
Mark Taylor
  • Constructor Details

    • StandardHubProfileFactory

      public StandardHubProfileFactory()
  • Method Details

    • getName

      public String getName()
      Returns "std".
      Specified by:
      getName in interface HubProfileFactory
      Returns:
      short name
    • getFlagsUsage

      public String[] getFlagsUsage()
      Description copied from interface: HubProfileFactory
      Returns an array of strings, each describing one command-line flag which will be consumed by the createProfile method.
      Specified by:
      getFlagsUsage in interface HubProfileFactory
      Returns:
      array of plain-text strings suitable for use as part of a usage message
    • createHubProfile

      public HubProfile createHubProfile(List flagList) throws IOException
      Description copied from interface: HubProfileFactory
      Creates a HubProfile perhaps configured using a supplied list of flags. Any flags which match those described by the HubProfileFactory.getFlagsUsage() command are used for configuration of the returned hub, and must be removed from the flagList 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 interface HubProfileFactory
      Parameters:
      flagList - mutable list of Strings giving command-ilne flags, some of which may be intended for configuring a profile
      Returns:
      new profile
      Throws:
      IOException
    • getHubProfileClass

      public 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 invoking HubProfileFactory.createHubProfile(java.util.List) with an empty flag list.
      Specified by:
      getHubProfileClass in interface HubProfileFactory
      Returns:
      HubProfile subclass with a public no-arg constructor