5046N/A/*
5046N/A * CDDL HEADER START
5046N/A *
5046N/A * The contents of this file are subject to the terms of the
5046N/A * Common Development and Distribution License, Version 1.0 only
5046N/A * (the "License"). You may not use this file except in compliance
5046N/A * with the License.
5046N/A *
5046N/A * You can obtain a copy of the license at
5046N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
5046N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5046N/A * See the License for the specific language governing permissions
5046N/A * and limitations under the License.
5046N/A *
5046N/A * When distributing Covered Code, include this CDDL HEADER in each
5046N/A * file and include the License file at
5046N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5046N/A * add the following below this CDDL HEADER, with the fields enclosed
5046N/A * by brackets "[]" replaced with your own identifying information:
5046N/A * Portions Copyright [yyyy] [name of copyright owner]
5046N/A *
5046N/A * CDDL HEADER END
5046N/A *
5046N/A *
5046N/A * Copyright 2010 Sun Microsystems, Inc.
5046N/A */
5046N/A
5046N/Aimport java.util.*;
5046N/A
5046N/Apublic class Server {
5046N/A public String host;
5046N/A public int port;
5046N/A
5046N/A public Server (String host, int port) {
5046N/A this.host=host;
5046N/A this.port=port;
5046N/A }
5046N/A
5046N/A public Server (String hostPort) {
5046N/A StringTokenizer st = new StringTokenizer(hostPort, ":");
5046N/A this.host=st.nextToken();
5046N/A this.port=Integer.parseInt(st.nextToken());
5046N/A }
5046N/A
5046N/A public String toString() {
5046N/A return (host + ":" + port);
5046N/A }
5046N/A}