JBoss Wise API

org.jboss.wise.core.client.jaxrs.impl
Class RSDynamicClientImpl

java.lang.Object
  extended by org.jboss.wise.core.client.jaxrs.impl.RSDynamicClientImpl
All Implemented Interfaces:
RSDynamicClient

@ThreadSafe
public class RSDynamicClientImpl
extends java.lang.Object
implements RSDynamicClient


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.wise.core.client.jaxrs.RSDynamicClient
RSDynamicClient.HttpMethod
 
Constructor Summary
RSDynamicClientImpl(java.lang.String resourceURI, java.lang.String produceMediaTypes, java.lang.String consumeMediaTypes, RSDynamicClient.HttpMethod httpMethod)
          Invoke JAXRS service.
RSDynamicClientImpl(java.lang.String resourceURI, java.lang.String produceMediaTypes, java.lang.String consumeMediaTypes, RSDynamicClient.HttpMethod httpMethod, java.util.Map<java.lang.String,java.lang.String> requestHeaders)
           
 
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.File request, WiseMapper mapper)
           
 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(org.apache.commons.httpclient.methods.RequestEntity requestEntity, WiseMapper mapper)
           
 InvocationResult invoke(java.lang.String request, WiseMapper mapper)
          Invoke JAXRS service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSDynamicClientImpl

public RSDynamicClientImpl(java.lang.String resourceURI,
                           java.lang.String produceMediaTypes,
                           java.lang.String consumeMediaTypes,
                           RSDynamicClient.HttpMethod httpMethod)
Invoke JAXRS service.

Parameters:
resourceURI -
produceMediaTypes - default to "* / *"
consumeMediaTypes - default to "* / *"
httpMethod -

RSDynamicClientImpl

public RSDynamicClientImpl(java.lang.String resourceURI,
                           java.lang.String produceMediaTypes,
                           java.lang.String consumeMediaTypes,
                           RSDynamicClient.HttpMethod httpMethod,
                           java.util.Map<java.lang.String,java.lang.String> requestHeaders)
Method Detail

getResourceURI

public java.lang.String getResourceURI()
Specified by:
getResourceURI in interface RSDynamicClient
Returns:
the JAXRS resource URI to be called.

getUser

public java.lang.String getUser()
Specified by:
getUser in interface RSDynamicClient
Returns:
User name used for HTTP authentication

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface RSDynamicClient
Returns:
Password used for HTTP authentication

getHttpMethod

public RSDynamicClient.HttpMethod getHttpMethod()
Specified by:
getHttpMethod in interface RSDynamicClient
Returns:
RSDynamicClient.HttpMethod used to call the resource (RSDynamicClient.getResourceURI())

getProduceMediaTypes

public java.lang.String getProduceMediaTypes()
Specified by:
getProduceMediaTypes in interface RSDynamicClient

getConsumeMediaTypes

public java.lang.String getConsumeMediaTypes()
Specified by:
getConsumeMediaTypes in interface RSDynamicClient

invoke

public InvocationResult invoke(java.util.Map<java.lang.String,java.lang.Object> inputObjects,
                               WiseMapper mapper)
Description copied from interface: RSDynamicClient
Invoke JAXRS service.

Specified by:
invoke in interface RSDynamicClient
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

public InvocationResult invoke(java.io.InputStream request,
                               WiseMapper mapper)
Description copied from interface: RSDynamicClient
Invoke JAXRS service.

Specified by:
invoke in interface RSDynamicClient
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

public InvocationResult invoke(java.lang.String request,
                               WiseMapper mapper)
Description copied from interface: RSDynamicClient
Invoke JAXRS service.

Specified by:
invoke in interface RSDynamicClient
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

public InvocationResult invoke(byte[] request,
                               WiseMapper mapper)
Description copied from interface: RSDynamicClient
Invoke JAXRS service.

Specified by:
invoke in interface RSDynamicClient
mapper - WiseMapper used to map inputObject to stream representation used to call the service
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

public InvocationResult invoke(java.io.File request,
                               WiseMapper mapper)

invoke

public InvocationResult invoke()
Description copied from interface: RSDynamicClient
Invoke JAXRS service.

Specified by:
invoke in interface RSDynamicClient
Returns:
InvocationResult implementation representing the result of JAXRS service

invoke

public InvocationResult invoke(org.apache.commons.httpclient.methods.RequestEntity requestEntity,
                               WiseMapper mapper)

JBoss Wise API

Copyright © 2008-2009 Jboss.org. All Rights Reserved.