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// ServiceAgent.java: Interface for the SLP Service Agent operations
2N/A// Author: James Kempf
2N/A// Created On: Mon Jul 7 09:05:40 1997
2N/A// Last Modified By: James Kempf
2N/A// Last Modified On: Thu Jan 7 14:17:12 1999
2N/A// Update Count: 16
2N/A//
2N/A
2N/Apackage com.sun.slp;
2N/A
2N/Aimport java.util.*;
2N/A
2N/A/**
2N/A * The Advertiser interface allows clients to register new service
2N/A * instances with SLP and to change the attributes of existing services.
2N/A *
2N/A * @see ServiceLocationManager
2N/A *
2N/A * @author James Kempf, Erik Guttman
2N/A */
2N/A
2N/Apublic interface Advertiser {
2N/A
2N/A /**
2N/A * Return the Advertiser'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 * Register a new service with the service location protocol in
2N/A * the Advertiser's locale.
2N/A *
2N/A * @param URL The service URL for the service.
2N/A * @param serviceLocationAttributes A vector of ServiceLocationAttribute
2N/A * objects describing the service.
2N/A * @exception ServiceLocationException An exception is thrown if the
2N/A * registration fails.
2N/A * @exception IllegalArgumentException A parameter is null or
2N/A * otherwise invalid.
2N/A *
2N/A */
2N/A
2N/A public void register(ServiceURL URL,
2N/A Vector serviceLocationAttributes)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Deregister a service with the service location protocol.
2N/A * This has the effect of deregistering the service from <b>every</b>
2N/A * Locale and scope under which it was registered.
2N/A *
2N/A * @param URL The service URL for the service.
2N/A * @exception ServiceLocationException An exception is thrown if the
2N/A * deregistration fails.
2N/A */
2N/A
2N/A public void deregister(ServiceURL URL)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Add attributes to a service URL in the locale of the Advertiser.
2N/A *
2N/A * Note that due to SLP v1 update semantics, the URL will be registered
2N/A * if it is not already.
2N/A *
2N/A *
2N/A * @param URL The service URL for the service.
2N/A * @param serviceLocationAttributes A vector of ServiceLocationAttribute
2N/A * objects to add.
2N/A * @exception ServiceLocationException An exception is thrown if the
2N/A * operation fails.
2N/A */
2N/A
2N/A public void addAttributes(ServiceURL URL,
2N/A Vector serviceLocationAttributes)
2N/A throws ServiceLocationException;
2N/A
2N/A /**
2N/A * Delete the attributes from a service URL in the locale of
2N/A * the Advertiser. The deletions are made for all scopes in
2N/A * which the URL is registered.
2N/A *
2N/A *
2N/A * @param URL The service URL for the service.
2N/A * @param attributeIds A vector of Strings indicating
2N/A * the attributes to remove.
2N/A * @exception ServiceLocationException An exception is thrown if the
2N/A * operation fails.
2N/A */
2N/A
2N/A public void deleteAttributes(ServiceURL URL,
2N/A Vector attributeIds)
2N/A throws ServiceLocationException;
2N/A}