Interface Module

All Known Subinterfaces:
FileTransferManager
All Known Implementing Classes:
AdHocCommandHandler, ArchiveManager, AuditManagerImpl, BasicModule, CertificateStoreManager, ClusterMonitor, ConnectionManagerImpl, DefaultFileTransferManager, EntityCapabilitiesManager, FileTransferProxy, InternalComponentManager, IQBindHandler, IQBlockingHandler, IQDiscoInfoHandler, IQDiscoItemsHandler, IQEntityTimeHandler, IQHandler, IQLastActivityHandler, IQMessageCarbonsHandler, IQMUCvCardHandler, IQOfflineMessagesHandler, IQPEPHandler, IQPEPOwnerHandler, IQPingHandler, IQPrivacyHandler, IQPrivateHandler, IQRegisterHandler, IQRosterHandler, IQRouter, IQSessionEstablishmentHandler, IQSharedGroupHandler, IQvCardHandler, IQVersionHandler, MediaProxyService, MessageRouter, MulticastDNSService, MulticastRouter, MultiUserChatManager, OfflineMessageStore, OfflineMessageStrategy, PacketDelivererImpl, PacketRouterImpl, PacketTransporterImpl, PresenceManagerImpl, PresenceRouter, PresenceSubscribeHandler, PresenceUpdateHandler, PrivateStorage, PubSubModule, RosterManager, RoutingTableImpl, SessionManager, SoftwareServerVersionManager, SoftwareVersionManager, TransportHandler, UpdateManager, VCardManager

public interface Module
Logical, server-managed entities must implement this interface. A module represents an operational unit and may contain zero or more services and rely on zero or more services that may be hosted by the container.

In order to be hosted in the Jive server container, all modules must:

  • Implement the Module interface
  • Have a public no-arg constructor

The Jive container will run all modules through a simple lifecycle:

 constructor -> initialize() -> start() -> stop() -> destroy() -> finalizer
                    |<-----------------------|          ^
                    |                                   |
                    V----------------------------------->
 

The Module interface is intended to provide the simplest mechanism for creating, deploying, and managing server modules.

Author:
Iain Shigeoka
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Module should free all resources and prepare for deallocation.
    Returns the name of the module for display in administration interfaces.
    void
    Initialize the module with the container.
    void
    Start the module (must return quickly).
    void
    Stop the module.
  • Method Details

    • getName

      String getName()
      Returns the name of the module for display in administration interfaces.
      Returns:
      The name of the module.
    • initialize

      void initialize(XMPPServer server)
      Initialize the module with the container. Modules may be initialized and never started, so modules should be prepared for a call to destroy() to follow initialize().
      Parameters:
      server - the server hosting this module.
    • start

      void start()
      Start the module (must return quickly). Any long running operations should spawn a thread and allow the method to return immediately.
    • stop

      void stop()
      Stop the module. The module should attempt to free up threads and prepare for either another call to initialize (reconfigure the module) or for destruction.
    • destroy

      void destroy()
      Module should free all resources and prepare for deallocation.