Class Descriptor

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class Descriptor
    extends org.xml.sax.helpers.DefaultHandler
    Instance of this class handles parsing of the xml descriptor files. It also retrieves values of the named attributes of the named elements.
    • Constructor Summary

      Constructors 
      Constructor Description
      Descriptor​(java.lang.String filePath)
      Constructor responsible for parsing the descriptor file named in filePath.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String getAttribute​(java.lang.String attrName, org.xml.sax.Attributes attribs)
      Gets the attribute.
      java.lang.String getFilterString()
      Returns the filterString.
      int getInstanceCount()
      Returns the instanceCount.
      private java.lang.String getName​(java.lang.String s1, java.lang.String s2)
      Gets the name.
      java.lang.String getNamingServiceHost()
      Gets the naming service host.
      java.lang.String getResourceSpecifierPath()
      Returns the resourceSpecifierPath.
      int getServerSocketTimeout()
      Gets the server socket timeout.
      java.lang.String getServiceName()
      Returns the serviceName.
      int getThreadPoolMaxSize()
      Gets the thread pool max size.
      int getThreadPoolMinSize()
      Gets the thread pool min size.
      private org.w3c.dom.Document parse​(java.lang.String configFile)
      Parses the.
      void setFilterString​(java.lang.String filterString)
      Sets the filterString.
      void setInstanceCount​(int instanceCount)
      Sets the instanceCount.
      void setNamingServiceHost​(java.lang.String namingServiceHost)
      Sets the naming service host.
      void setResourceSpecifierPath​(java.lang.String resourceSpecifierPath)
      Sets the resourceSpecifierPath.
      void setServerSocketTimeout​(int serverSocketTimeout)
      Sets the server socket timeout.
      void setServiceName​(java.lang.String serviceName)
      Sets the serviceName.
      void setThreadPoolMaxSize​(int threadPoolMaxSize)
      Sets the thread pool max size.
      void setThreadPoolMinSize​(int threadPoolMinSize)
      Sets the thread pool min size.
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attribs)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serviceName

        private java.lang.String serviceName
        The service name.
      • instanceCount

        private int instanceCount
        The instance count.
      • resourceSpecifierPath

        private java.lang.String resourceSpecifierPath
        The resource specifier path.
      • filterString

        private java.lang.String filterString
        The filter string.
      • namingServiceHost

        private java.lang.String namingServiceHost
        The naming service host.
      • serverSocketTimeout

        private int serverSocketTimeout
        The server socket timeout.
      • threadPoolMinSize

        private int threadPoolMinSize
        The thread pool min size.
      • threadPoolMaxSize

        private int threadPoolMaxSize
        The thread pool max size.
    • Constructor Detail

      • Descriptor

        public Descriptor​(java.lang.String filePath)
        Constructor responsible for parsing the descriptor file named in filePath.
        Parameters:
        filePath - Fully qualified path the xml descriptor.
    • Method Detail

      • parse

        private org.w3c.dom.Document parse​(java.lang.String configFile)
        Parses the.
        Parameters:
        configFile - the config file
        Returns:
        the document
      • getAttribute

        private java.lang.String getAttribute​(java.lang.String attrName,
                                              org.xml.sax.Attributes attribs)
        Gets the attribute.
        Parameters:
        attrName - the attr name
        attribs - the attribs
        Returns:
        the attribute
      • getName

        private java.lang.String getName​(java.lang.String s1,
                                         java.lang.String s2)
        Gets the name.
        Parameters:
        s1 - the s 1
        s2 - the s 2
        Returns:
        the name
      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attribs)
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
      • getThreadPoolMaxSize

        public int getThreadPoolMaxSize()
        Gets the thread pool max size.
        Returns:
        the thread pool max size
      • setThreadPoolMaxSize

        public void setThreadPoolMaxSize​(int threadPoolMaxSize)
        Sets the thread pool max size.
        Parameters:
        threadPoolMaxSize - the new thread pool max size
      • getThreadPoolMinSize

        public int getThreadPoolMinSize()
        Gets the thread pool min size.
        Returns:
        the thread pool min size
      • setThreadPoolMinSize

        public void setThreadPoolMinSize​(int threadPoolMinSize)
        Sets the thread pool min size.
        Parameters:
        threadPoolMinSize - the new thread pool min size
      • getInstanceCount

        public int getInstanceCount()
        Returns the instanceCount.
        Returns:
        int
      • getResourceSpecifierPath

        public java.lang.String getResourceSpecifierPath()
        Returns the resourceSpecifierPath.
        Returns:
        String
      • getServiceName

        public java.lang.String getServiceName()
        Returns the serviceName.
        Returns:
        String
      • setInstanceCount

        public void setInstanceCount​(int instanceCount)
        Sets the instanceCount.
        Parameters:
        instanceCount - The instanceCount to set
      • setResourceSpecifierPath

        public void setResourceSpecifierPath​(java.lang.String resourceSpecifierPath)
        Sets the resourceSpecifierPath.
        Parameters:
        resourceSpecifierPath - The resourceSpecifierPath to set
      • setServiceName

        public void setServiceName​(java.lang.String serviceName)
        Sets the serviceName.
        Parameters:
        serviceName - The serviceName to set
      • getFilterString

        public java.lang.String getFilterString()
        Returns the filterString.
        Returns:
        String
      • setFilterString

        public void setFilterString​(java.lang.String filterString)
        Sets the filterString.
        Parameters:
        filterString - The filterString to set
      • getNamingServiceHost

        public java.lang.String getNamingServiceHost()
        Gets the naming service host.
        Returns:
        the naming service host
      • setNamingServiceHost

        public void setNamingServiceHost​(java.lang.String namingServiceHost)
        Sets the naming service host.
        Parameters:
        namingServiceHost - the new naming service host
      • getServerSocketTimeout

        public int getServerSocketTimeout()
        Gets the server socket timeout.
        Returns:
        the server socket timeout
      • setServerSocketTimeout

        public void setServerSocketTimeout​(int serverSocketTimeout)
        Sets the server socket timeout.
        Parameters:
        serverSocketTimeout - the new server socket timeout