blob: 254cb9785e187480ae89bc50415f34bbbbb9e9dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.service.monitor.internal.health;
import com.yahoo.vespa.athenz.identity.ServiceIdentityProvider;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import java.net.URL;
/**
* @author hakon
*/
class HttpHealthEndpoint implements HealthEndpoint {
private final URL url;
private final ConnectionSocketFactory socketFactory;
HttpHealthEndpoint(URL url) {
this.url = url;
this.socketFactory = PlainConnectionSocketFactory.getSocketFactory();
}
@Override
public URL getStateV1HealthUrl() {
return url;
}
@Override
public ConnectionSocketFactory getConnectionSocketFactory() {
return socketFactory;
}
@Override
public void registerListener(ServiceIdentityProvider.Listener listener) {
}
@Override
public void removeListener(ServiceIdentityProvider.Listener listener) {
}
@Override
public String description() {
return url.toString();
}
}
|