fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
91ebeef555ce7f899b6270a3c2df47b51f7ad59aahrens * Common Development and Distribution License (the "License").
91ebeef555ce7f899b6270a3c2df47b51f7ad59aahrens * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5Lin Ling * Copyright (c) 1999 by Sun Microsystems, Inc.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens// ServiceURL.java : The service URL.
fa9e4066f08beec538e775443c5be79dd423fcabahrens// Author: James Kempf, Erik Guttman
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The ServiceURL object models the SLP service URL. Both service: URLs
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and regular URLs are handled by this class.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @author James Kempf, Erik Guttman
fa9e4066f08beec538e775443c5be79dd423fcabahrenspublic class ServiceURL extends Object implements Serializable {
fa9e4066f08beec538e775443c5be79dd423fcabahrens // Recognized transports.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Indicates that no port information is required or was returned
fa9e4066f08beec538e775443c5be79dd423fcabahrens * for this service URL.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * No life time parameter is given.
91ebeef555ce7f899b6270a3c2df47b51f7ad59aahrens * Default lifetime, 3 hours.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Maximum lifetime, approximately 18 hours.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Reregister periodically.
fa9e4066f08beec538e775443c5be79dd423fcabahrens // Maximum port size.
fa9e4066f08beec538e775443c5be79dd423fcabahrens // data fields
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Construct a service URL object.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @param URL The service URL as a string.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @param iLifetime The service advertisement lifetime.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @exception IllegalArgumentException Thrown if parse
fa9e4066f08beec538e775443c5be79dd423fcabahrens * errors occur in the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * parameter.
fa9e4066f08beec538e775443c5be79dd423fcabahrens SLPConfig.getSLPConfig().formatMessage("lifetime_error",
fa9e4066f08beec538e775443c5be79dd423fcabahrens // ------------------------------------------------------------------
fa9e4066f08beec538e775443c5be79dd423fcabahrens // Accessors
fa9e4066f08beec538e775443c5be79dd423fcabahrens // ------------------------------------------------------------------
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @return The service type name.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Set service type and naming authority if this is not a service: URL.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @param type The new ServiceType object.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @exception IllegalArgumentException If the service type name or
fa9e4066f08beec538e775443c5be79dd423fcabahrens * naming authority name is invalid.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @return The machine name or IP address.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @return The port number, if any.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * @return The URL path description, if any.
return lifetime;
port +
if (obj == this) {
return isPermanent;
throws IllegalArgumentException {
char c = s.charAt(i);
new Object[] {
new Character(c)}));
throws IllegalArgumentException {
noDoubleSlash = true;
noDoubleSlash = true;