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