java.lang.Object
org.gcube.social_networking.social_networking_client_library.BaseClient
Direct Known Subclasses:
CommentClient, FullTextSearchClient, HashTagClient, LibClient, LikeClient, MessageClient, NotificationClient, PeopleClient, PostClient, TokenClient, UserClient, VREClient

public abstract class BaseClient extends Object
Base client service.

The service endpoint is resolved per context: the client discovers the endpoint in the context that is current at construction time (failing fast when the service is not available there) and again, once per context and then cached, the first time it is used in another context. A client instance can therefore be kept and reused across contexts.

Author:
Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
  • Field Details

    • SG3_BRIDGE_PROPERTY

      public static final String SG3_BRIDGE_PROPERTY
      System property controlling whether SG4-only portlet endpoints are bridged through LibClient (2/lib/*) and legacy 2/* endpoints supported by the SmartGears 3 social-networking-library-ws server.

      Defaults to true so Liferay 7.4 portlets work transparently against the deployed SG3 service and can switch to native SG4 endpoints by setting -Dsocial.client.sg3.bridge=false.

      See Also:
  • Constructor Details

  • Method Details

    • getServiceEndpoint

      public String getServiceEndpoint()
      Returns:
      the endpoint of the service in the current context, discovered on first use in that context.
      Throws:
      IllegalStateException - if the endpoint cannot be discovered in the current context