Class TopicManagementService

  • All Implemented Interfaces:
    Service

    public class TopicManagementService
    extends BaseService
    TopicManagement service main class
    Author:
    Giovanni Caire - TILAB
    • Constructor Detail

      • TopicManagementService

        public TopicManagementService()
    • Method Detail

      • init

        public void init​(AgentContainer ac,
                         Profile p)
                  throws ProfileException
        Description copied from interface: Service
        Performs the passive initialization step of the service. This method is called before activating the service. Its role should be simply the one of a constructor, setting up the internal data as needed. Service implementations should not use the Service Manager and Service Finder facilities from within this method. A distributed initialization protocol, if needed, should be exectuted within the boot() method.
        Specified by:
        init in interface Service
        Overrides:
        init in class BaseService
        Parameters:
        ac - The agent container this service is activated on.
        p - The configuration profile for this service.
        Throws:
        ProfileException - If the given profile is not valid.
      • boot

        public void boot​(Profile p)
                  throws ServiceException
        Description copied from interface: Service
        Performs the active initialization step of a kernel-level service. When JADE kernel calls this method, the service has already been already associated with its container and registered with the Service Manager.
        Specified by:
        boot in interface Service
        Overrides:
        boot in class BaseService
        Parameters:
        p - The configuration profile for this service.
        Throws:
        ServiceException - If a problem occurs during service initialization.
      • getName

        public String getName()
        Description copied from interface: Service
        Retrieve the name of this service, that can be used to look up its slices in the Service Finder.
        Returns:
        The name of this service.
        See Also:
        ServiceFinder
      • getCommandFilter

        public Filter getCommandFilter​(boolean direction)
        Description copied from class: BaseService
        This should be properly implemented by the services that have filters. Note that when called multiple times with the same value of the direction parameter this method MUST always return the same object!
        Specified by:
        getCommandFilter in interface Service
        Overrides:
        getCommandFilter in class BaseService
        Parameters:
        direction - One of the two constants Filter.INCOMING and Filter.OUTGOING, distinguishing between the two filter chains managed by the command processor.
        Returns:
        A Filter object, used by this service to intercept and process kernel-level commands. If the service does not wish to install a command filter for one or both directions, it can just return null when appropriate.
        See Also:
        CommandProcessor
      • getHorizontalInterface

        public Class getHorizontalInterface()
        Description copied from class: BaseService
        This should be properly implemented by the services that have non-empty slices.
        Specified by:
        getHorizontalInterface in interface Service
        Overrides:
        getHorizontalInterface in class BaseService
        Returns:
        A Class object, representing the interface that is implemented by the slices of this service. Let s be the Class object corresponding to the Service.Slice interface, and let c be the returned Class object. Then, the two following conditions must hold:
        1. c.isInterface() == true
        2. s.isAssignableFrom(c) == true
      • getLocalSlice

        public Service.Slice getLocalSlice()
        Retrieve the locally installed slice of this service.
        Specified by:
        getLocalSlice in interface Service
        Overrides:
        getLocalSlice in class BaseService
        Returns:
        The slice of this service that resides on the local platform node, or null if no such slice exists.
      • dump

        public String dump​(String key)
        Description copied from class: BaseService
        This method can be redefined to support service internal data inspection by means of the ContainerMonitorAgent included in the misc add-on. The default implementation just dumps the map of cached slices
        Overrides:
        dump in class BaseService
        Parameters:
        key - A hint indicating which service data should be dumped
        Returns:
        A string representation of the service internal data