Class PortProvider


  • public class PortProvider
    extends java.lang.Object
    Utility class that provides a port number for the Resteasy embedded container.
    Version:
    $Revision$
    • Constructor Summary

      Constructors 
      Constructor Description
      PortProvider()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getHost()
      Look up the configured hostname, first checking an environment variable (RESTEASY_HOST), then a system property (org.jboss.resteasy.host), and finally the default hostname (localhost).
      static int getPort()
      /** Look up the configured port number, first checking an environment variable (RESTEASY_PORT), then a system property (org.jboss.resteasy.port), and finally the default port (8081).
      • Methods inherited from class java.lang.Object

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

      • PortProvider

        public PortProvider()
    • Method Detail

      • getPort

        public static int getPort()
        /** Look up the configured port number, first checking an environment variable (RESTEASY_PORT), then a system property (org.jboss.resteasy.port), and finally the default port (8081).
        Returns:
        the port number specified in either the environment or system properties
      • getHost

        public static java.lang.String getHost()
        Look up the configured hostname, first checking an environment variable (RESTEASY_HOST), then a system property (org.jboss.resteasy.host), and finally the default hostname (localhost).
        Returns:
        the host specified in either the environment or system properties