Package org.jboss.resteasy.util
Class PortProvider
- java.lang.Object
-
- org.jboss.resteasy.util.PortProvider
-
public class PortProvider extends Object
Utility class that provides a port number for the Resteasy embedded container.- Version:
- $Revision$
- Author:
- Justin Edelson
-
-
Constructor Summary
Constructors Constructor Description PortProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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).
-
-
-
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 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
-
-