1fba2635c088b01af59300e8a02611bb788ee3bffchrismair/* 2fba2635c088b01af59300e8a02611bb788ee3bffchrismair * Copyright 2009 the original author or authors. 3fba2635c088b01af59300e8a02611bb788ee3bffchrismair * 4fba2635c088b01af59300e8a02611bb788ee3bffchrismair * Licensed under the Apache License, Version 2.0 (the "License"); 5fba2635c088b01af59300e8a02611bb788ee3bffchrismair * you may not use this file except in compliance with the License. 6fba2635c088b01af59300e8a02611bb788ee3bffchrismair * You may obtain a copy of the License at 7fba2635c088b01af59300e8a02611bb788ee3bffchrismair * 8fba2635c088b01af59300e8a02611bb788ee3bffchrismair * http://www.apache.org/licenses/LICENSE-2.0 9fba2635c088b01af59300e8a02611bb788ee3bffchrismair * 10fba2635c088b01af59300e8a02611bb788ee3bffchrismair * Unless required by applicable law or agreed to in writing, software 11fba2635c088b01af59300e8a02611bb788ee3bffchrismair * distributed under the License is distributed on an "AS IS" BASIS, 12fba2635c088b01af59300e8a02611bb788ee3bffchrismair * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fba2635c088b01af59300e8a02611bb788ee3bffchrismair * See the License for the specific language governing permissions and 14fba2635c088b01af59300e8a02611bb788ee3bffchrismair * limitations under the License. 15fba2635c088b01af59300e8a02611bb788ee3bffchrismair */ 16fba2635c088b01af59300e8a02611bb788ee3bffchrismairpackage org.mockftpserver.core.util; 17fba2635c088b01af59300e8a02611bb788ee3bffchrismair 18fba2635c088b01af59300e8a02611bb788ee3bffchrismairimport java.net.InetAddress; 19fba2635c088b01af59300e8a02611bb788ee3bffchrismair 20fba2635c088b01af59300e8a02611bb788ee3bffchrismair/** 21fba2635c088b01af59300e8a02611bb788ee3bffchrismair * A data-only (transfer) object representing a host (InetAddress) and port number 22fba2635c088b01af59300e8a02611bb788ee3bffchrismair * that together uniquely identify an endpoint for a socket connection. 23fba2635c088b01af59300e8a02611bb788ee3bffchrismair * 24fba2635c088b01af59300e8a02611bb788ee3bffchrismair * This class contains two public properties: host (java.net.InetAddress) and port (int). 25fba2635c088b01af59300e8a02611bb788ee3bffchrismair * 26fba2635c088b01af59300e8a02611bb788ee3bffchrismair * @author Chris Mair 27fba2635c088b01af59300e8a02611bb788ee3bffchrismair * @version : $ - : $ 28fba2635c088b01af59300e8a02611bb788ee3bffchrismair */ 29fba2635c088b01af59300e8a02611bb788ee3bffchrismairpublic class HostAndPort { 30fba2635c088b01af59300e8a02611bb788ee3bffchrismair public InetAddress host; 31fba2635c088b01af59300e8a02611bb788ee3bffchrismair public int port; 32fba2635c088b01af59300e8a02611bb788ee3bffchrismair 33fba2635c088b01af59300e8a02611bb788ee3bffchrismair /** 34fba2635c088b01af59300e8a02611bb788ee3bffchrismair * Construct a new instance with the specified host and port 35fba2635c088b01af59300e8a02611bb788ee3bffchrismair * @param host - the InetAddress host 36fba2635c088b01af59300e8a02611bb788ee3bffchrismair * @param port - the port number 37fba2635c088b01af59300e8a02611bb788ee3bffchrismair */ 38fba2635c088b01af59300e8a02611bb788ee3bffchrismair public HostAndPort(InetAddress host, int port) { 39fba2635c088b01af59300e8a02611bb788ee3bffchrismair this.host = host; 40fba2635c088b01af59300e8a02611bb788ee3bffchrismair this.port = port; 41fba2635c088b01af59300e8a02611bb788ee3bffchrismair } 42fba2635c088b01af59300e8a02611bb788ee3bffchrismair} 43