Package jade.core

Interface ServiceManager

  • All Known Implementing Classes:
    ServiceManagerImpl

    public interface ServiceManager
    The ServiceManager interface serves as an access point for kernel-level service management. From a service manager object one can add and remove a service, or perform service management activities such as service suspension, resumption or parameter tuning.
    Author:
    Giovanni Rimassa - FRAMeTech s.r.l.
    See Also:
    Service
    • Method Detail

      • getPlatformName

        String getPlatformName()
                        throws IMTPException
        Retrieves the platform name from the platform Service Manager.
        Returns:
        The name of the platform, that can be used to compose the GUID of the resident agents.
        Throws:
        IMTPException - If an underlying network error forbids to fetch the name from the remote end.
      • addAddress

        void addAddress​(String addr)
                 throws IMTPException
        Adds an address to the address list of this Service Manager.
        Parameters:
        addr - The address to add, as a stringified URL.
        Throws:
        IMTPException - If an underlying network error occurs.
      • removeAddress

        void removeAddress​(String addr)
                    throws IMTPException
        Removes an address to the address list of this Service Manager.
        Parameters:
        addr - The address to remove, as a stringified URL.
        Throws:
        IMTPException - If an underlying network error occurs.
      • getLocalAddress

        String getLocalAddress()
                        throws IMTPException
        Access the address exported by this copy of the Service Manager.
        Returns:
        The locally exported address.
        Throws:
        IMTPException - If an underlying network error occurs.
      • addNode

        void addNode​(NodeDescriptor desc,
                     ServiceDescriptor[] services)
              throws IMTPException,
                     ServiceException,
                     JADESecurityException
        Adds a new node to the distributed platform. The node abstraction can correspond to an agent container, but also to a different kind of networked component (command proxy server, persistent repository, etc.) of the JADE platform.
        Parameters:
        desc - The description of the new node to add, containing the node identifier and other node properties.
        services - An array of ServiceDescriptor objects, describing the various kernel-level services that are to be activated on the newly created node.
        Throws:
        IMTPException - If an underlying network error forbids to tell whether the requested operation was possible. In that case, the operation is not executed.
        ServiceException - If the requested operation couldn't be executed (or an execution attempt failed) due to some condition on the remote end.
        JADESecurityException
      • removeNode

        void removeNode​(NodeDescriptor desc)
                 throws IMTPException,
                        ServiceException
        Removes a node from the distributed platform. The node abstraction can correspond to an agent container, but also to a different kind of networked component (command proxy server, persistent repository, etc.) of the JADE platform.
        Parameters:
        desc - The description of the node to remove. At the very least, the description must contain a node identifier used as a key in node findng operations.
        Throws:
        IMTPException - If an underlying network error forbids to tell whether the requested operation was possible. In that case, the operation is not executed.
        ServiceException - If the requested operation couldn't be executed (or an execution attempt failed) due to some condition on the remote end.
      • activateService

        void activateService​(ServiceDescriptor desc)
                      throws IMTPException,
                             ServiceException
        Activates a new service on the local agent container. Depending on whether the service is already active on other containers, the result can be the actual federation of this container and other containers service slices.
        Parameters:
        desc - The ServiceDescriptor object specifying the Service object implementing the service, along with the name and properties of the service.
        Throws:
        IMTPException - If an underlying network error forbids to tell whether the requested operation was possible. In that case, the operation is not executed.
        ServiceException - If the requested operation couldn't be executed (or an execution attempt failed) due to some condition on the remote end.
        See Also:
        ServiceFinder
      • deactivateService

        void deactivateService​(String name)
                        throws IMTPException,
                               ServiceException
        Deactivates a service on the local container. Depending on whether the service is enabled also on other containers, this method can cause the complete service deactivation on the platform or just the detchmnent of the service slice corresponding to this container.
        Parameters:
        name - The name of the service to be deactivated.
        Throws:
        IMTPException - If an underlying network error forbids to tell whether the requested operation was possible. In that case, the operation is not executed.
        ServiceException - If the requested operation couldn't be executed (or an execution attempt failed) due to some condition on the remote end.
        See Also:
        ServiceFinder
      • getLocalServices

        Vector getLocalServices()
        Retrieve the list of locally installed services as a Vector of ServiceDescriptor objects
        Returns:
        the list of locally installed services as a Vector of ServiceDescriptor objects