org.jboss.wise.core.client.jaxrs
Interface RSDynamicClient

All Known Implementing Classes:
RSDynamicClientImpl

@Immutable
public interface RSDynamicClient

This is the Wise core class responsible to invoke the JAX-RS tools endpoint. It is used directly to represent a JAXRS service and invoke it.


Nested Class Summary
static class RSDynamicClient.HttpMethod
          JAXRS HTTP Method supported by Wise
 
Method Summary
 java.lang.String getConsumeMediaTypes()
           
 RSDynamicClient.HttpMethod getHttpMethod()
           
 java.lang.String getPassword()
           
 java.lang.String getProduceMediaTypes()
           
 java.lang.String getResourceURI()
           
 java.lang.String getUser()
           
 InvocationResult invoke()
          Invoke JAXRS service.
 InvocationResult invoke(byte[] request, WiseMapper mapper)
          Invoke JAXRS service.
 InvocationResult invoke(java.io.InputStream request, WiseMapper mapper)
          Invoke JAXRS service.
 InvocationResult invoke(java.util.Map<java.lang.String,java.lang.Object> inputObjects, WiseMapper mapper)
          Invoke JAXRS service.
 InvocationResult invoke(java.lang.String request, WiseMapper mapper)
          Invoke JAXRS service.
 

Method Detail

getResourceURI

java.lang.String getResourceURI()
Returns:
the JAXRS resource URI to be called.

getUser

java.lang.String getUser()
Returns:
User name used for HTTP authentication

getPassword

java.lang.String getPassword()
Returns:
Password used for HTTP authentication

getHttpMethod

RSDynamicClient.HttpMethod getHttpMethod()
Returns:
RSDynamicClient.HttpMethod used to call the resource (getResourceURI())

getProduceMediaTypes

java.lang.String getProduceMediaTypes()

getConsumeMediaTypes

java.lang.String getConsumeMediaTypes()

invoke

InvocationResult invoke(java.util.Map<java.lang.String,java.lang.Object> inputObjects,
                        WiseMapper mapper)
Invoke JAXRS service.

Parameters:
inputObjects - it's a Map containing objects to call the services. They can be pojo mapped to stream using a SmooksMapper, JAXB annotated object marshaled using a JAXBMapper, a standard key/value pair with keys "ContentType" and "JAXRSStream". In the last case ContentType represent the content type of the input that have to be converted to the content type needed by service call if possible. If it isn't possible an InvalidParameterException is thrown
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

InvocationResult invoke(java.io.InputStream request,
                        WiseMapper mapper)
Invoke JAXRS service.

Parameters:
request -
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

InvocationResult invoke(java.lang.String request,
                        WiseMapper mapper)
Invoke JAXRS service.

Parameters:
request -
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

InvocationResult invoke(byte[] request,
                        WiseMapper mapper)
Invoke JAXRS service.

Parameters:
request -
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

InvocationResult invoke()
Invoke JAXRS service.

Returns:
InvocationResult implementation representing the result of JAXRS service