View Javadoc

1   /*
2      Copyright 2007 Ivo Limmen
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15  */
16  package org.limmen.crs.client.locator;
17  
18  public class Service {
19  
20  	private final String contextPath;
21  
22  	private final String hostname;
23  
24  	private final int port;
25  
26     public Service(String hostname, int port) {
27  
28     	this(hostname, port, null);
29     }
30  
31     public Service(String hostname, int port, String contextPath) {
32  
33     	super();
34  
35     	this.hostname = hostname;
36     	this.port = port;
37     	this.contextPath = contextPath;
38     }
39  
40     public String getContextPath() {
41  
42  	   return contextPath;
43     }
44  
45     public String getHostname() {
46  
47  	   return hostname;
48     }
49  
50     public int getPort() {
51  
52  	   return port;
53     }
54  }