/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*
*/
// SSrvMsg.java: Message class for SLP service request.
// Author: James Kempf
// Created On: Thu Oct 9 13:40:16 1997
// Last Modified By: James Kempf
// Last Modified On: Tue Oct 27 10:57:38 1998
// Update Count: 112
//
/**
* The SSrvMsg class models the SLP service (request, reply) message
* server side. Subclasses for other versions can specialize the
* initialize() and makeReply() methods.
*
* @author James Kempf
*/
protected SSrvMsg() {}
// Construct a SSrvMsg from the byte input stream.
throws ServiceLocationException, IOException {
this.initialize(dis);
}
// Initialize the message from the input stream.
throws ServiceLocationException, IOException {
// First get the previous responder.
// Get the service type.
throw
"srq_stype_missing",
new Object[0]);
}
serviceType = t.toString();
// Get vector of scopes.
// Validate, but check for empty if solicitation for DAAdvert
// or SAAdvert.
throw
"no_scope_vector",
new Object[0]);
}
} else {
// Unescape scope strings.
}
// Get the query.
// Get the SPI
" service type=``" +
serviceType + "''\n" +
" query=``" +
query + "''\n" +
" spi=``" +
spi + "''");
}
// Construct a SSrvMsg from the arguments. This will be a SrvRply
// for transmission to the client.
throws ServiceLocationException {
// keep this info so SAs can drop 0 replies
// Write out size.
int nurls = 0;
// Write out the members of the list, including the lifetime.
while (en.hasMoreElements()) {
if (URLSignatures != null) {
if (selectedAuth != null) {
}
authDesc =
selectedAuth.toString() :
"No Auth Block\n");
}
// Parse out a URL entry. Check overflow. If the packet has filled
// up, then break out of the loop.
auth,
baos,
true) == false) {
// Note that we set overflow here because there are additional
// URL's, but we don't have to truncate the packet.
// We need to rewrite the size to what it should be.
break;
}
nurls++;
}
// Construct description.
return hdr;
}
}