Class WBEMServiceAdvertisementSLP

  • All Implemented Interfaces:
    WBEMServiceAdvertisement

    public class WBEMServiceAdvertisementSLP
    extends java.lang.Object
    implements WBEMServiceAdvertisement
    Class WBEMServiceAdvertisementSLP is the SLP specific implementation if the WBEMServiceAdvertisement interface.
    Since:
    2.0.2
    Invariants:
    iDA != null && iServiceUrl != null && iAttributeMap != null
    • Constructor Detail

      • WBEMServiceAdvertisementSLP

        public WBEMServiceAdvertisementSLP​(java.lang.String pDA,
                                           ServiceURL pUrl,
                                           java.util.List<java.lang.String> pAttributes)
        Ctor.
        Parameters:
        pDA - The Directory Agent from which this advertisement was received
        pUrl - The SLP service url returned by Locator.findServices().
        pAttributes - The attribute list (List<String>) where each entry looks either like this key=value or this (key=value).
    • Method Detail

      • getAttribute

        public java.lang.String getAttribute​(java.lang.String pAttributeName)
        Description copied from interface: WBEMServiceAdvertisement
        Return the attribute value for a given attribute name
        Specified by:
        getAttribute in interface WBEMServiceAdvertisement
        Parameters:
        pAttributeName - The attribute name
        Returns:
        The value
      • getAttributes

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.String>> getAttributes()
        Description copied from interface: WBEMServiceAdvertisement
        Return the set of attributes of this advertisement
        Specified by:
        getAttributes in interface WBEMServiceAdvertisement
        Returns:
        A Set<Map.Entry<String, String>> containing the name value pairs of the attributes.
      • getConcreteServiceType

        public java.lang.String getConcreteServiceType()
        Description copied from interface: WBEMServiceAdvertisement
        Returns the concrete service type. E.g. for the SLP advertised service service:wbem:https this method would return https.
        Specified by:
        getConcreteServiceType in interface WBEMServiceAdvertisement
        Returns:
        The concrete service type
      • createClient

        public WBEMClient createClient​(javax.security.auth.Subject pSubject,
                                       java.util.Locale[] pLocales)
                                throws java.lang.Exception
        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 interface WBEMServiceAdvertisement
        Parameters:
        pSubject - The credential for authenticating with the service
        pLocales - An array of locales ordered by preference
        Returns:
        The WBEM client
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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 interface WBEMServiceAdvertisement
        Parameters:
        pExpired - The new value
      • equals

        public boolean equals​(java.lang.Object pObj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object