Class BEManagementService

  • All Implemented Interfaces:
    Service

    public class BEManagementService
    extends BaseService
    This service handles BEContainer creation requests and manages IO operations for data exchanged between the created BEContainers and their FEContainers in an asynchronous way using java.nio

    Having this functionality implemented as a service allows propagating (through the ServiceHelper) BackEnd related events (e.g. disconnections and reconnections) at the agent level.

    This service accepts the following configuration parameters:
    jade_imtp_leap_nio_BEManagementService_servers: list of of IOEventServer ids separated by ';'
    Actually this service is a collection of IOEventServer objects. Each IOEventServer opens and manages a server socket, accepts BackEnd creation/connection requests and passes incoming data to BEDispatchers independently from the others. If the above parameter is not specified a single IOEventServer will be started and its ID will be jade_imtp_leap_nio_BEManagementService. All other parameters are related to a single IOEventServer and must be specified in the form
    serverid_parametername
    They are:
    • serverid_local-host: Specifies the local network interface for the server socket managed by this server (defaults to localhost).
    • serverid_local-port: Specifies the local port for the server socket managed by this server (defaults to 2099)
    • serverid_protocol: Specifies the protocol used by this server in the form of jade.imtp.leap.JICP.ProtocolManager class
    • serverid_additional-services: Specifies additional services that have to be activated in each BackEnd Container started by the indicated server
    • serverid_leap-property-file: Specifies the leap-property file to be used by this server.
    • serverid_poolsize: Specifies the number of threads used by this server to manage IO events.
      Author:
      Giovanni Caire - TILAB
      • Constructor Detail

        • BEManagementService

          public BEManagementService()
      • Method Detail

        • 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
        • getBufferIncreaseSize

          public static final int getBufferIncreaseSize()
        • getOwnedCommands

          public String[] getOwnedCommands()
          Description copied from class: BaseService
          This should be properly implemented by the services that owns vertival commands.
          Specified by:
          getOwnedCommands in interface Service
          Overrides:
          getOwnedCommands in class BaseService
          Returns:
          An array containing the names of all the vertical commands this service wants to own. If this service has no such commands (it acts purely as a command filter), it can return an empty array, or null as well.
          See Also:
          jade.core.Service#getCommandSink()
        • 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
          This method is called by the JADE runtime just after this service has been installed. It activates the IO event servers specified in the Profile and the Ticker thread.
          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.
        • shutdown

          public void shutdown()
          This is called by the JADE Runtime when this service is deinstalled. It stops the Ticker thread and all active IO event servers.
          Specified by:
          shutdown in interface Service
          Overrides:
          shutdown in class BaseService