2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 1999 by Sun Microsystems, Inc.
2N/A * All rights reserved.
2N/A *
2N/A */
2N/A
2N/A// UserAgent.java: Interface for the SLP User Agent operations
2N/A// Author: James Kempf
2N/A// Created On: Mon Jul 7 09:15:56 1997
2N/A// Last Modified By: James Kempf
2N/A// Last Modified On: Wed May 13 17:46:29 1998
2N/A// Update Count: 17
2N/A//
2N/A
2N/Apackage com.sun.slp;
2N/A
2N/Aimport java.util.*;
2N/A
2N/A/**
2N/A * The Locator interface allows clients to query SLP for existing
2N/A * services, scopes, and service instances, and to query about attributes
2N/A * of a particular service instance.
2N/A *
2N/A * @see ServiceLocationManager
2N/A *
2N/A * @author James Kempf, Erik Guttman
2N/A */
2N/A
2N/Apublic interface Locator {
2N/A
2N/A /**
2N/A * Return the Locator's locale object.
2N/A *
2N/A * @return The Locale object.
2N/A */
2N/A
2N/A Locale getLocale();
2N/A
2N/A /**
2N/A * Return an enumeration of known service types for this scope and naming
2N/A * authority. Unless a proprietary or experimental service is being
2N/A * discovered, the namingAuthority parameter should be the empty
2N/A * string, "".
2N/A *
2N/A * @param namingAuthority The naming authority, "" for default,
2N/A * '*' for any naming authority.
2N/A * @param scopes The SLP scopes of the types.
2N/A * @return ServiceLocationEnumeration of ServiceType objects for
2N/A * the service type names.
2N/A * @exception IllegalArgumentException If any of the parameters are
2N/A * null or syntactically incorrect.
2N/A * @exception ServiceLocationException An exception is thrown if the
2N/A * operation fails.
2N/A */
2N/A
2N/A public ServiceLocationEnumeration findServiceTypes(String namingAuthority,
2N/A Vector scopes)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Return an enumeration of ServiceURL objects for services matching
2N/A * the query. The services are returned from the locale of the
2N/A * locator.
2N/A *
2N/A * @param type The type of the service (e.g. printer, etc.).
2N/A * @param scopes The SLP scopes of the service types.
2N/A * @param query A string with the SLP query.
2N/A * @return ServiceLocationEnumeration of ServiceURL objects for
2N/A * services matching the
2N/A * attributes.
2N/A * @exception ServiceLocationException An exception is returned if the
2N/A * operation fails.
2N/A * @see ServiceURL
2N/A */
2N/A
2N/A public ServiceLocationEnumeration findServices(ServiceType type,
2N/A Vector scopes,
2N/A String query)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Return the attributes for the service URL, using the locale
2N/A * of the locator.
2N/A *
2N/A * @param URL The service URL.
2N/A * @param scopes The SLP scopes of the service.
2N/A * @param attributeIds A vector of strings identifying the desired
2N/A * attributes. A null value means return all
2N/A * the attributes. <b>Partial id strings</b> may
2N/A * begin with '*' to match all ids which end with
2N/A * the given suffix, or end with '*' to match all
2N/A * ids which begin with a given prefix, or begin
2N/A * and end with '*' to do substring matching for
2N/A * ids containing the given partial id.
2N/A * @return ServiceLocationEnumeration of ServiceLocationAttribute
2N/A * objects matching the ids.
2N/A * @exception ServiceLocationException An exception is returned if the
2N/A * operation fails.
2N/A * @exception IllegalArgumentException If any of the parameters are
2N/A * null or syntactically incorrect.
2N/A * @see ServiceLocationAttribute
2N/A *
2N/A */
2N/A
2N/A public ServiceLocationEnumeration findAttributes(ServiceURL URL,
2N/A Vector scopes,
2N/A Vector attributeIds)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Return all attributes for all service URL's having this
2N/A * service type in the locale of the Locator.
2N/A *
2N/A * @param type The service type.
2N/A * @param scopes The SLP scopes of the service type.
2N/A * @param attributeIds A vector of strings identifying the desired
2N/A * attributes. A null value means return all
2N/A * the attributes. <b>Partial id strings</b> may
2N/A * begin with '*' to match all ids which end with
2N/A * the given suffix, or end with '*' to match all
2N/A * ids which begin with a given prefix, or begin
2N/A * and end with '*' to do substring matching for
2N/A * ids containing the given partial id.
2N/A * @return ServiceLocationEnumeration of ServiceLocationAttribute
2N/A * objects matching the ids.
2N/A * @exception ServiceLocationException An exception is returned if the
2N/A * operation fails.
2N/A * @exception IllegalArgumentException If any of the parameters are
2N/A * null or syntactically incorrect.
2N/A * @see ServiceLocationAttribute
2N/A *
2N/A */
2N/A
2N/A public ServiceLocationEnumeration findAttributes(ServiceType type,
2N/A Vector scopes,
2N/A Vector attributeIds)
2N/A throws ServiceLocationException;
2N/A
2N/A
2N/A}