Class TcpPayloadHealthCheck


  • public class TcpPayloadHealthCheck
    extends HealthCheck
    Represents a healthcheck that checks a tcp service is healthy using a call/response sequence of payloads
         {
             "id": "tcppayloadcheck",
             "type": "tcppayload",
             "payloads": [
                 {
                     "type": "send",
                     "hex": "1234567890"
                 },
                 {
                     "type": "receiveregex",
                     "regex": ".{6}",
                     "encoded": true
                 }
             ],
             "connectionTimeout": 5,
             "sequenceTimeout": 15
         }
     
    • Constructor Detail

      • TcpPayloadHealthCheck

        @Contract(pure=true)
        public TcpPayloadHealthCheck​(java.lang.String id,
                                     java.lang.String type,
                                     java.util.List<TcpPayload> payloads,
                                     java.lang.Integer connectionTimeout,
                                     java.lang.Integer sequenceTimeout)
        Create a TcpPayloadHealthCheck
        Parameters:
        id - id of the healthcheck
        type - type of the healthcheck (tcppayload)
        payloads - the payloads to send/receive
        connectionTimeout - the timeout on the initial connection
        sequenceTimeout - the timeout on the whole sequence
    • Method Detail

      • getPayloads

        public java.util.List<TcpPayload> getPayloads()
      • getConnectionTimeout

        public java.lang.Integer getConnectionTimeout()
      • getSequenceTimeout

        public java.lang.Integer getSequenceTimeout()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object