Package org.apache.sling.discovery.base.connectors.ping

# Class TopologyConnectorClient

java.lang.Object
org.apache.sling.discovery.base.connectors.ping.TopologyConnectorClient

All Implemented Interfaces:
  `TopologyConnectorClientInformation`

public class TopologyConnectorClient extends Object implements TopologyConnectorClientInformation
A topology connector client is used for sending (pinging) a remote topology connector servlet and exchanging announcements with it

## Method Summary

Modifier and Type
Method
Description
`void`
`disconnect()`
Disconnect this connector
`URL`
`getConnectorUrl()`
the endpoint url where this connector is connecting to
`String`
`getId()`
the unique id of this connector
`long`
`getLastPingSent()`
the unix-millis when the last heartbeat was sent
`String`
`getLastRequestEncoding()`
the Content-Encoding of the last request
`String`
`getLastResponseEncoding()`
the Content-Encoding of the last response
`int`
`getNextPingDue()`
the seconds until the next heartbeat is due
`String`
`getRemoteSlingId()`
the sling id of the remote end
`int`
`getStatusCode()`
return the http status code of the last post to the servlet, -1 if no post was ever done
`String`
`getStatusDetails()`
provides more details about connection failures
`boolean`
`isAutoStopped()`
SLING-3316 : whether or not this connector was auto-stopped
`boolean`
`isConnected()`
whether or not this connector was able to successfully connect
`boolean`
`representsLoop()`
whether or not the counterpart of this connector has detected a loop in the topology connectors

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getStatusCode

public int getStatusCode()
Description copied from interface: `TopologyConnectorClientInformation`
return the http status code of the last post to the servlet, -1 if no post was ever done

Specified by:
  `getStatusCode` in interface `TopologyConnectorClientInformation`

### getConnectorUrl

public URL getConnectorUrl()
Description copied from interface: `TopologyConnectorClientInformation`
the endpoint url where this connector is connecting to

Specified by:
  `getConnectorUrl` in interface `TopologyConnectorClientInformation`

### representsLoop

public boolean representsLoop()
Description copied from interface: `TopologyConnectorClientInformation`
whether or not the counterpart of this connector has detected a loop in the topology connectors

Specified by:
  `representsLoop` in interface `TopologyConnectorClientInformation`

### isConnected

public boolean isConnected()
Description copied from interface: `TopologyConnectorClientInformation`
whether or not this connector was able to successfully connect

Specified by:
  `isConnected` in interface `TopologyConnectorClientInformation`

### getStatusDetails

public String getStatusDetails()
Description copied from interface: `TopologyConnectorClientInformation`
provides more details about connection failures

Specified by:
  `getStatusDetails` in interface `TopologyConnectorClientInformation`

### getLastPingSent

public long getLastPingSent()
Description copied from interface: `TopologyConnectorClientInformation`
the unix-millis when the last heartbeat was sent

Specified by:
  `getLastPingSent` in interface `TopologyConnectorClientInformation`

### getNextPingDue

public int getNextPingDue()
Description copied from interface: `TopologyConnectorClientInformation`
the seconds until the next heartbeat is due

Specified by:
  `getNextPingDue` in interface `TopologyConnectorClientInformation`

### isAutoStopped

public boolean isAutoStopped()
Description copied from interface: `TopologyConnectorClientInformation`
SLING-3316 : whether or not this connector was auto-stopped

Specified by:
  `isAutoStopped` in interface `TopologyConnectorClientInformation`

### getLastRequestEncoding

public String getLastRequestEncoding()
Description copied from interface: `TopologyConnectorClientInformation`
the Content-Encoding of the last request

Specified by:
  `getLastRequestEncoding` in interface `TopologyConnectorClientInformation`

### getLastResponseEncoding

public String getLastResponseEncoding()
Description copied from interface: `TopologyConnectorClientInformation`
the Content-Encoding of the last response

Specified by:
  `getLastResponseEncoding` in interface `TopologyConnectorClientInformation`

### getRemoteSlingId

public String getRemoteSlingId()
Description copied from interface: `TopologyConnectorClientInformation`
the sling id of the remote end

Specified by:
  `getRemoteSlingId` in interface `TopologyConnectorClientInformation`

### getId

public String getId()
Description copied from interface: `TopologyConnectorClientInformation`
the unique id of this connector

Specified by:
  `getId` in interface `TopologyConnectorClientInformation`

### disconnect

public void disconnect()
Disconnect this connector