100dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair/* 200dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * Copyright 2009 the original author or authors. 300dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * 400dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * Licensed under the Apache License, Version 2.0 (the "License"); 500dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * you may not use this file except in compliance with the License. 600dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * You may obtain a copy of the License at 700dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * 800dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * http://www.apache.org/licenses/LICENSE-2.0 900dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * 1000dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * Unless required by applicable law or agreed to in writing, software 1100dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * distributed under the License is distributed on an "AS IS" BASIS, 1200dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1300dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * See the License for the specific language governing permissions and 1400dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * limitations under the License. 1500dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair */ 1600dc7bdcf1df9e86789d963984dfc6912a8854c6chrismairpackage org.mockftpserver.core.util; 1700dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair 1800dc7bdcf1df9e86789d963984dfc6912a8854c6chrismairimport java.net.InetAddress; 1900dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair 2000dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair/** 2100dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * A data-only (transfer) object representing a host (InetAddress) and port number 2200dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * that together uniquely identify an endpoint for a socket connection. 2300dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * 2400dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * This class contains two public properties: host (java.net.InetAddress) and port (int). 2500dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * 2600dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * @author Chris Mair 2700dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * @version : $ - : $ 2800dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair */ 2900dc7bdcf1df9e86789d963984dfc6912a8854c6chrismairpublic class HostAndPort { 3000dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair public InetAddress host; 3100dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair public int port; 3200dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair 3300dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair /** 3400dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * Construct a new instance with the specified host and port 3500dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * @param host - the InetAddress host 3600dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair * @param port - the port number 3700dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair */ 3800dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair public HostAndPort(InetAddress host, int port) { 3900dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair this.host = host; 4000dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair this.port = port; 4100dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair } 4200dc7bdcf1df9e86789d963984dfc6912a8854c6chrismair} 43