org.ogf.graap.wsag.client.rest
Class RestRemoteClient<T>

java.lang.Object
  extended by org.ogf.graap.wsag.client.api.RemoteClient
      extended by org.ogf.graap.wsag.client.rest.RestRemoteClient<T>
Type Parameters:
T - the type of the REST interface definition

public class RestRemoteClient<T>
extends RemoteClient

Default implementation of a RESTful WSAG4J client. Instances of the remote client implementation must specify the type of the REST resource as an JAX-RS anotated interface.

Author:
owaeld

Method Summary
 T getApplicationClient()
          Returns the REST client instance.
static
<U> RestRemoteClient<U>
getInstance(EndpointReferenceType reference, Properties properties, ISecurityProperties securityProperties, Class<U> interfaceClass)
          Returns a new instance of a REST remote client.
static
<U> RestRemoteClient<U>
getInstance(String uri, Properties properties, ISecurityProperties securityProperties, Class<U> interfaceClass)
          Returns a new instance of a REST remote client.
 
Methods inherited from class org.ogf.graap.wsag.client.api.RemoteClient
getProperties, getRemoteReference, getSecurityProperties, isUsingTrace, setProperties, setSecurityProperties, setTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static <U> RestRemoteClient<U> getInstance(EndpointReferenceType reference,
                                                  Properties properties,
                                                  ISecurityProperties securityProperties,
                                                  Class<U> interfaceClass)
Returns a new instance of a REST remote client.

Type Parameters:
U - the JAX-RS annotated interface of the REST resource
Parameters:
reference - the URI of the REST resource as endpoint reference
properties - the client properties
securityProperties - the client security properties
interfaceClass - the class of the JAX-RS annotated interface of the REST resource
Returns:
the REST client

getInstance

public static <U> RestRemoteClient<U> getInstance(String uri,
                                                  Properties properties,
                                                  ISecurityProperties securityProperties,
                                                  Class<U> interfaceClass)
Returns a new instance of a REST remote client.

Type Parameters:
U - the JAX-RS annotated interface of the REST resource
Parameters:
uri - the URI of the REST resource
properties - the client properties
securityProperties - the client security properties
interfaceClass - the class of the JAX-RS annotated interface of the REST resource
Returns:
the REST client

getApplicationClient

public T getApplicationClient()
Returns the REST client instance.

Returns:
the REST client instance.


Copyright © 2008-2012. All Rights Reserved.