Package de.xima.fc.fs

Class FSConnectionManager


  • public final class FSConnectionManager
    extends Object
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getConnection

        public static FSConnection getConnection​(long fsConnectionID)
      • getConnection

        public static FSConnection getConnection​(FrontendServer frontendServer)
        Gets the connection for the given frontend server, if available.
        Parameters:
        frontendServer - The frontend server to get the connection for
        Returns:
        The connection for the given frontend server, or null if no connection is available
      • connect

        public static boolean connect​(FrontendServer fServerEntity)
      • disconnect

        public static boolean disconnect​(FrontendServer fServerEntity)
      • cleanup

        public static boolean cleanup​(FrontendServer fServerEntity)
      • disconnectAll

        public static Boolean disconnectAll()
      • stopReconnect

        public static void stopReconnect​(FrontendServer fs)
      • startConnectThreads

        public static Boolean startConnectThreads()
      • stopConnectThreads

        public static void stopConnectThreads()
      • isUseSSL

        public static boolean isUseSSL​(FrontendServer fs)
        Determines if SSL should be used for the given frontend server.
        Parameters:
        fs - the frontend server to check
        Returns:
        true if SSL should be used, false otherwise
      • testLookup

        public static Boolean testLookup​(FrontendServer fs)
        Method to test the connection to a frontend-server (lookup only)
        Parameters:
        fs - the frontend-server to test the lookup
        Returns:
        Boolean if the server can be reached
      • testConnection

        public static boolean testConnection​(FrontendServer fs)
      • testConnection

        public static boolean testConnection​(long fsConnectionID)
      • fireEvent

        public static <TEvent extends Serializable> void fireEvent​(TEvent event,
                                                                   Long fsId)
        Fires an event on the frontend server with the given ID. If no frontend server ID is provided, the event is fired on all connected frontend servers.
        Type Parameters:
        TEvent - the type of the event
        Parameters:
        event - the event to fire
        fsId - the ID of the frontend server. If null, the event is fired on all connected frontend servers.
        Throws:
        IllegalArgumentException - if the event is null or if the specified frontend server ID does not exist
      • triggerRestart

        public static boolean triggerRestart​(FrontendServer fServerEntity,
                                             boolean forceCreateKeystoreIfSSLModeAuto)
        Triggers a restart of the frontend server associated with the given entity.
        Parameters:
        fServerEntity - the frontend server entity to restart
        forceCreateKeystoreIfSSLModeAuto - whether to force create a keystore (which includes updating SSL certificate used for connections) if SSL mode is set to auto
        Returns:
        true if the restart was triggered successfully, false otherwise