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 *
6982N/A * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A * or http://forgerock.org/license/CDDLv1.0.html.
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
6982N/A * file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A * If applicable, add the following below this CDDL HEADER, with the
6982N/A * fields enclosed by brackets "[]" replaced with your own identifying
6982N/A * 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}