Class TargetFactory

java.lang.Object
org.gcube.common.calls.jaxrs.TargetFactory
All Implemented Interfaces:
TargetFactoryDSL.AtClause

public class TargetFactory extends Object implements TargetFactoryDSL.AtClause
Factory for creating JAX-RS web targets for gCube services.
Author:
Fabio Simeoni
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.ws.rs.client.WebTarget
    at(jakarta.xml.ws.EndpointReference endpoint)
    Creates a web target at the given endpoint reference.
    jakarta.ws.rs.client.WebTarget
    at(String address)
    Returns a stub for a service endpoint at a given address.
    org.gcube.common.gxrest.request.GXWebTargetAdapterRequest
    Returns a stub for a service endpoint at a given address.
    Creates a target factory for the given gCube service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • stubFor

      public static TargetFactory stubFor(GcubeService target)
      Creates a target factory for the given gCube service.
      Parameters:
      target - the gCube service
      Returns:
      a new target factory
    • getAsGxRest

      public org.gcube.common.gxrest.request.GXWebTargetAdapterRequest getAsGxRest(String address)
      Description copied from interface: TargetFactoryDSL.AtClause
      Returns a stub for a service endpoint at a given address.
      Specified by:
      getAsGxRest in interface TargetFactoryDSL.AtClause
      Parameters:
      address - the address
      Returns:
      the stub
    • at

      public jakarta.ws.rs.client.WebTarget at(String address)
      Description copied from interface: TargetFactoryDSL.AtClause
      Returns a stub for a service endpoint at a given address.
      Specified by:
      at in interface TargetFactoryDSL.AtClause
      Parameters:
      address - the address
      Returns:
      the stub
    • at

      public jakarta.ws.rs.client.WebTarget at(jakarta.xml.ws.EndpointReference endpoint)
      Creates a web target at the given endpoint reference.
      Parameters:
      endpoint - the endpoint reference
      Returns:
      the web target