blob: 0b2711eed1c51a5e729e91268247e0cbc859c245 (
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
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.federation.http;
/**
* Represents a connection to a particular node (host/port).
* Right now this is just a container of connection parameters, but might be extended to
* contain an open connection later.
* The host and port state is immutable.
*
* @author bratseth
*/
public class Connection {
private String host;
private int port;
public Connection(String host,int port) {
this.host=host;
this.port=port;
}
public String getHost() { return host; }
public int getPort() { return port; }
public String toString() {
return "http connection '" + host + ":" + port + "'";
}
}
|