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 * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 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 * Copyright (c) 1999 by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A// Author: James Kempf 2N/A// Created On: Tue May 19 15:22:04 1998 2N/A// Last Modified By: James Kempf 2N/A// Last Modified On: Thu Mar 4 10:39:06 1999 2N/A * This class supplies a regular interval 'heartbeat' DAAdvertisement. 2N/A * Implementation specific subclasses handle incoming DAAdverts and 2N/A * forwarding of registrations and deregistrations to other DAs. The 2N/A * implementation specific subclasses depend on how the server is 2N/A * representing DA information internally. 2N/A * @author James Kempf, Erik Guttman 2N/A // V2 advertising has the same DAAdvert every time. 2N/A // Initialize the DAAdvertiser on the designated interface. 2N/A // If we've got it, return. 2N/A // Get the config object. 2N/A // Get the SLPv2 DAADvert to send 2N/A // Create a new DAAdvertiser for this interface, with SLPv2 2N/A // Start thread running. 2N/A // Used by V1 subclass constructor. 2N/A // Create a new DAAdvertiser for the interface for default multicast 2N/A // address. Externalize the message and set the instance variable. 2N/A // Config may not be initialized if this was called directly from 2N/A // Externalize the DAAdvert. 2N/A // Initialize the networking for default multicast address. 2N/A // Convert advert to bytes, initialize networking. 2N/A // Set the interface and multicast address on this advertiser. 2N/A // Get the socket from the listener object corresponding to this 2N/A // interface. The listener will always be started before the 2N/A // DAAdvertiser, otherwise, SAs may start sending registrations 2N/A // before anybody is listening. 2N/A // If the socket is null, then there is no listener. Open a 2N/A // new socket. Note that any listener opened *afterwards* will 2N/A // not get this socket. 2N/A // Set the thread name. 2N/A // Sleep until next time. 2N/A // Somebody interrupted us. If we are to exit, then do so. 2N/A // Send an unsolicited DAAdvert. 2N/A // Tell the listener to refresh the socket. 2N/A // Return the buffer for transmission. 2N/A // Stop the thread from executing.