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