Class PLLClient


  • public class PLLClient
    extends Object
    The PLLClient class is used to send RequestSet XML documents to the URL specified in the send() method. The high level services and application can use Naming Service to find the service specific URL. This class provides static methods to register notification handlers.
    See Also:
    RequestSet, Response, SendRequestException, NotificationHandler
    • Constructor Detail

      • PLLClient

        public PLLClient()
    • Method Detail

      • send

        public static Vector send​(URL url,
                                  RequestSet set)
                           throws SendRequestException
        Translates the Java object to an XML RequestSet document and sends the corresponding XML document to the specified URL.
        Parameters:
        url - The destination URL for the RequestSet XML document.
        set - The RequestSet Java object to be translated to an XML RequestSet document.
        Throws:
        SendRequestException - if there is an error in sending the XML document.
      • send

        public static Vector send​(URL url,
                                  String cookies,
                                  RequestSet set)
                           throws SendRequestException
        Translates the Java object to an XML RequestSet document and sends the corresponding XML document to the specified URL.
        Parameters:
        url - The destination URL for the RequestSet XML document.
        cookies - The value for Http Request Header 'Cookie'
        set - The RequestSet Java object to be translated to an XML RequestSet document.
        Throws:
        SendRequestException - if there is an error in sending the XML document.
      • send

        public static Vector send​(URL url,
                                  RequestSet set,
                                  HashMap cookieTable)
                           throws SendRequestException
        Translates the Java object to an XML RequestSet document and sends the corresponding XML document to the specified URL.
        Parameters:
        url - The destination URL for the RequestSet XML document.
        set - The RequestSet Java object to be translated to an XML RequestSet document.
        cookieTable - The HashMap that constains cookies to be replayed and stores cookies retrieved from the response.
        Throws:
        SendRequestException - if there is an error in sending the XML document.
      • parseCookies

        public static void parseCookies​(Map headers,
                                        HashMap cookieTable)
        Parses the cookies from the response header and stores them in in cookieTable
        Parameters:
        headers - The Map containig headers
        cookieTable - The HashMap that constains cookies to be replayed and stores cookies retrieved from the response.
      • addNotificationHandler

        public static void addNotificationHandler​(String service,
                                                  NotificationHandler handler)
                                           throws AlreadyRegisteredException
        Adds a notification handler for a service. This handler is used by the Platform Low Level servlet to pass notifications for processing.
        Parameters:
        service - The name of the service such as session, profile
        handler - The handler for notification processing
        Throws:
        AlreadyRegisteredException
      • removeNotificationHandler

        public static void removeNotificationHandler​(String service)
        Removes a notification handler of a service.
        Parameters:
        service - The name of the service whose handler needs to be removed
      • getNotificationHandler

        public static NotificationHandler getNotificationHandler​(String service)
        Gets a notification handler of a service.
        Parameters:
        service - The name of the service whose handler needs to be returned