Class JoramTestServerBeanDefinitionParser

  • All Implemented Interfaces:
    org.springframework.beans.factory.xml.BeanDefinitionParser

    public class JoramTestServerBeanDefinitionParser
    extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
    Parser to the joram:testserver xml entry.

    This if all in one entry, non configuration files, ...

    • Create and start a collocated Joram server on localhost.
    • Create the Joram administration wrapper
    • Create the anonymous user

    The joram user attributes:

    • sid (optionnal): the server id (default “0”)
    • port (optionnal): the server port (default “16010”)
    
     A simple example:
     
     <!-- lets create an embedded Joram server for test, create a user "anonymous" and create a collocated admin wrapper  -->
     <joram:testserver id="server" />
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Logger logger  
      • Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

        ID_ATTRIBUTE, NAME_ATTRIBUTE
    • Field Detail

      • logger

        public static final Logger logger
    • Constructor Detail

      • JoramTestServerBeanDefinitionParser

        public JoramTestServerBeanDefinitionParser()
    • Method Detail

      • getBeanClass

        protected Class getBeanClass​(Element element)
        Overrides:
        getBeanClass in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
      • doParse

        protected void doParse​(Element element,
                               org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
        Overrides:
        doParse in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
      • createAndStart

        public void createAndStart​(short sid,
                                   String port)
                            throws Exception
        Parameters:
        sid -
        port -
        Throws:
        Exception
      • createAdminWrapper

        private void createAdminWrapper()
                                 throws Exception
        Throws:
        Exception
      • createUser

        private void createUser​(short sid)
                         throws Exception
        Parameters:
        sid -
        Throws:
        Exception