Class Service

java.lang.Object
io.stargate.sdk.Service
Direct Known Subclasses:
ServiceHttp

public abstract class Service extends Object
SuperClass for ApiEndpoint.
  • Field Details

    • id

      protected String id
      Instance id.
    • endpoint

      protected String endpoint
      Service Endpoint.
    • healthCheckEndpoint

      protected String healthCheckEndpoint
      Health Check.
  • Constructor Details

    • Service

      public Service(String id, String endpoint, String healthCheckEndpoint)
      Constructor.
      Parameters:
      id - identifier
      endpoint - endpoint
      healthCheckEndpoint - health-check
  • Method Details

    • isAlive

      public abstract boolean isAlive()
      Invoke heath endpoint.
      Returns:
      is the service is up.
    • getId

      public String getId()
      Gets id
      Returns:
      value of id
    • setId

      public void setId(String id)
      Set value for id
      Parameters:
      id - new value for id
    • getEndpoint

      public String getEndpoint()
      Gets endpoint
      Returns:
      value of endpoint
    • setEndpoint

      public void setEndpoint(String endpoint)
      Set value for endpoint
      Parameters:
      endpoint - new value for endpoint
    • getHealthCheckEndpoint

      public String getHealthCheckEndpoint()
      Gets healthCheckEndpoint
      Returns:
      value of healthCheckEndpoint
    • setHealthCheckEndpoint

      public void setHealthCheckEndpoint(String healthCheckEndpoint)
      Set value for healthCheckEndpoint
      Parameters:
      healthCheckEndpoint - new value for healthCheckEndpoint