|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.resteasy.test.TestPortProvider
public class TestPortProvider
Utility class that provides a port number for the Resteasy embedded container.
| Constructor Summary | |
|---|---|
TestPortProvider()
|
|
| Method Summary | ||
|---|---|---|
static ClientRequest |
createClientRequest(ClientRequestFactory factory,
String path)
|
|
static ClientRequest |
createClientRequest(String path)
Create a Resteasy ClientRequest object using the configured port. |
|
static org.apache.commons.httpclient.methods.DeleteMethod |
createDeleteMethod(String path)
Create a commons-httpclient DeleteMethod object. |
|
static org.apache.commons.httpclient.methods.GetMethod |
createGetMethod(String path)
Create a commons-httpclient GetMethod object. |
|
static org.apache.commons.httpclient.methods.OptionsMethod |
createOptionsMethod(String path)
Create a commons-httpclient OptionsMethod object. |
|
static org.apache.commons.httpclient.methods.PostMethod |
createPostMethod(String path)
Create a commons-httpclient PostMethod object. |
|
static
|
createProxy(Class<T> clazz)
Create a Resteasy client proxy with an empty base request path. |
|
static
|
createProxy(Class<T> clazz,
String path)
Create a Resteasy client proxy. |
|
static org.apache.commons.httpclient.methods.PutMethod |
createPutMethod(String path)
Create a commons-httpclient PutMethod object. |
|
static URI |
createURI(String path)
Create a URI for the provided path, using the configured port |
|
static URL |
createURL(String path)
Create a URL for the provided path, using the configured port |
|
static String |
generateBaseUrl()
Generate a base URL incorporating the configured port. |
|
static String |
generateURL(String path)
Generate a URL incorporating the configured port. |
|
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 |
|---|
public TestPortProvider()
| Method Detail |
|---|
public static ClientRequest createClientRequest(String path)
path - the request path
public static ClientRequest createClientRequest(ClientRequestFactory factory,
String path)
public static org.apache.commons.httpclient.methods.DeleteMethod createDeleteMethod(String path)
path - the request path
public static org.apache.commons.httpclient.methods.GetMethod createGetMethod(String path)
path - the request path
public static org.apache.commons.httpclient.methods.OptionsMethod createOptionsMethod(String path)
path - the request path
public static org.apache.commons.httpclient.methods.PostMethod createPostMethod(String path)
path - the request path
public static <T> T createProxy(Class<T> clazz)
clazz - the client interface class
public static <T> T createProxy(Class<T> clazz,
String path)
clazz - the client interface class
public static org.apache.commons.httpclient.methods.PutMethod createPutMethod(String path)
path - the request path
public static URI createURI(String path)
path - the request path
public static URL createURL(String path)
throws MalformedURLException
path - the request path
MalformedURLExceptionpublic static String generateBaseUrl()
public static String generateURL(String path)
path - the path
public static int getPort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||