org.sblim.slp.internal

Class AdvertiserImpl

Implemented Interfaces:
Advertiser

public class AdvertiserImpl
extends java.lang.Object
implements Advertiser

The class AdvertiserImpl implements the Advertister interface as defined by RFC 3224

Constructor Summary

AdvertiserImpl(Locale pLocale)

Method Summary

void
addAttributes(ServiceURL pUrl, Vector pAttributes)
Update the registration by adding the given attributes.
void
deleteAttributes(ServiceURL pUrl, Vector pAttributeIds)
Delete the attributes from a URL for the locale with which the Advertiser was created.
void
deregister(ServiceURL pServiceUrl)
Deregister a service from the SLP framework.
Locale
getLocale()
Return the language locale with which this object was created.
void
register(ServiceURL pServiceUrl, Vector pAttibutes)
Register a new service with SLP having the given attributes.

Constructor Details

AdvertiserImpl

public AdvertiserImpl(Locale pLocale)

Method Details

addAttributes

public void addAttributes(ServiceURL pUrl,
                          Vector pAttributes)
            throws ServiceLocationException
Update the registration by adding the given attributes. The API library is required to perform the operation in all scopes obtained through configuration.
Specified by:
addAttributes in interface Advertiser
Parameters:
pAttributes - A Vector of ServiceLocationAttribute objects to add to the existing registration. Use an empty vector to update the URL alone. May not be null.

deleteAttributes

public void deleteAttributes(ServiceURL pUrl,
                             Vector pAttributeIds)
            throws ServiceLocationException
Delete the attributes from a URL for the locale with which the Advertiser was created. The API library is required to perform the operation in all scopes obtained through configuration.
Specified by:
deleteAttributes in interface Advertiser
Parameters:
pAttributeIds - A vector of Strings indicating the ids of the attributes to remove. The strings may be attribute ids or they may be wildcard patterns to match ids. See [7] for the syntax of wildcard patterns. The strings may include SLP reserved characters, they will be escaped by the API before transmission. May not be the empty vector or null.

deregister

public void deregister(ServiceURL pServiceUrl)
            throws ServiceLocationException
Deregister a service from the SLP framework. This has the effect of deregistering the service from every language locale. The API library is required to perform the operation in all scopes obtained through configuration.
Specified by:
deregister in interface Advertiser
Parameters:

getLocale

public Locale getLocale()
Return the language locale with which this object was created.
Specified by:
getLocale in interface Advertiser
Returns:
The locale

register

public void register(ServiceURL pServiceUrl,
                     Vector pAttibutes)
            throws ServiceLocationException
Register a new service with SLP having the given attributes. The API library is required to perform the operation in all scopes obtained through configuration.
Specified by:
register in interface Advertiser
Parameters:

Copyright © 2005, 2007 IBM Corporation. All Rights Reserved.