Class WBEMServiceAdvertisementSLP
java.lang.Object
org.sblim.cimclient.internal.discovery.slp.WBEMServiceAdvertisementSLP
- All Implemented Interfaces:
WBEMServiceAdvertisement
Class WBEMServiceAdvertisementSLP is the SLP specific implementation if the
WBEMServiceAdvertisement interface.
- Since:
- 2.0.2
- Invariants:
- iDA != null invalid input: '&'invalid input: '&' iServiceUrl != null invalid input: '&'invalid input: '&' iAttributeMap != null
-
Field Summary
Fields inherited from interface WBEMServiceAdvertisement
AUTH_MECH_DESC, AUTH_MECH_SUPP, CLASSINFO, COMM_MECHANISM, FUNCTIONAL_PROF_DESC, FUNCTIONAL_PROF_SUPP, INTEROP_NS, MULT_OPERATIONS_SUPP, NAMESPACE, OTHER_COMM_MECHN_DESC, PROTOCOL_VERSION, REG_PROF_SUPP, SERVICE_HI_DESC, SERVICE_HI_NAME, SERVICE_ID, TEMPLATE_DESCRIPTION, TEMPLATE_TYPE, TEMPLATE_URL_SYNTAX, TEMPLATE_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionWBEMServiceAdvertisementSLP
(String pDA, ServiceURL pUrl, List<String> pAttributes) Ctor. -
Method Summary
Modifier and TypeMethodDescriptioncreateClient
(Subject pSubject, Locale[] pLocales) Creates a fully-initialized WBEMClient instance connected to the service that is subject of this advertisement.boolean
getAttribute
(String pAttributeName) Return the attribute value for a given attribute nameReturn the set of attributes of this advertisementReturns the concrete service type.Gets the URL of the directory from which this advertisement was receivedString[]
Returns the interop namespacesReturns the service idReturns the service url, e.g.int
hashCode()
boolean
Returns the expiration state of the advertisement.void
setExpired
(boolean pExpired) Sets the expirations state of the advertisement.toString()
-
Constructor Details
-
WBEMServiceAdvertisementSLP
Ctor.- Parameters:
pDA
- The Directory Agent from which this advertisement was receivedpUrl
- The SLP service url returned by Locator.findServices().pAttributes
- The attribute list (List<String>) where each entry looks either like thiskey=value
or this(key=value)
.
-
-
Method Details
-
getAttribute
Description copied from interface:WBEMServiceAdvertisement
Return the attribute value for a given attribute name- Specified by:
getAttribute
in interfaceWBEMServiceAdvertisement
- Parameters:
pAttributeName
- The attribute name- Returns:
- The value
-
getAttributes
Description copied from interface:WBEMServiceAdvertisement
Return the set of attributes of this advertisement- Specified by:
getAttributes
in interfaceWBEMServiceAdvertisement
- Returns:
- A Set<Map.Entry<String, String>> containing the name value pairs of the attributes.
-
getConcreteServiceType
Description copied from interface:WBEMServiceAdvertisement
Returns the concrete service type. E.g. for the SLP advertised serviceservice:wbem:https
this method would returnhttps
.- Specified by:
getConcreteServiceType
in interfaceWBEMServiceAdvertisement
- Returns:
- The concrete service type
-
getServiceUrl
Description copied from interface:WBEMServiceAdvertisement
Returns the service url, e.g. http://9.155.62.79:5988- Specified by:
getServiceUrl
in interfaceWBEMServiceAdvertisement
- Returns:
- The service url
-
createClient
Description copied from interface:WBEMServiceAdvertisement
Creates a fully-initialized WBEMClient instance connected to the service that is subject of this advertisement. On every call to this method a new client will be created. The client is not stored or cached anywhere in this class.- Specified by:
createClient
in interfaceWBEMServiceAdvertisement
- Parameters:
pSubject
- The credential for authenticating with the servicepLocales
- An array of locales ordered by preference- Returns:
- The WBEM client
- Throws:
Exception
-
getDirectory
Description copied from interface:WBEMServiceAdvertisement
Gets the URL of the directory from which this advertisement was received- Specified by:
getDirectory
in interfaceWBEMServiceAdvertisement
- Returns:
- The directory URL
-
toString
-
getInteropNamespaces
Description copied from interface:WBEMServiceAdvertisement
Returns the interop namespaces- Specified by:
getInteropNamespaces
in interfaceWBEMServiceAdvertisement
- Returns:
- The interop namespaces
-
getServiceId
Description copied from interface:WBEMServiceAdvertisement
Returns the service id- Specified by:
getServiceId
in interfaceWBEMServiceAdvertisement
- Returns:
- The service id
-
isExpired
public boolean isExpired()Description copied from interface:WBEMServiceAdvertisement
Returns the expiration state of the advertisement.- Specified by:
isExpired
in interfaceWBEMServiceAdvertisement
- Returns:
true
when advertisement is expired.
-
setExpired
public void setExpired(boolean pExpired) Description copied from interface:WBEMServiceAdvertisement
Sets the expirations state of the advertisement. Might be used by the application to mark an advertisement as expired, e.g. when it's no longer reported by the corresponding directory. Used for this purpose by AdvertisementCatalog.- Specified by:
setExpired
in interfaceWBEMServiceAdvertisement
- Parameters:
pExpired
- The new value
-
equals
-
hashCode
-