Class FSConnectionManager
java.lang.Object
de.xima.fc.fs.FSConnectionManager
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancleanup(FrontendServer fServerEntity) static booleanconnect(FrontendServer fServerEntity) static booleandisconnect(FrontendServer fServerEntity) static Booleanstatic <TEvent extends Serializable>
voidFires an event on the frontend server with the given ID.static FSConnectiongetConnection(long fsConnectionID) static FSConnectiongetConnection(FrontendServer frontendServer) Gets the connection for the given frontend server, if available.static Map<Long, FSConnection> static EConnectionStatusstatic booleanDetermines if SSL should be used for the given frontend server.static booleanstatic Booleanstatic Booleanstatic voidstatic voidstatic booleantestConnection(long fsConnectionID) static booleanstatic BooleanMethod to test the connection to a frontend-server (lookup only)static booleantriggerRestart(FrontendServer fServerEntity, boolean forceCreateKeystoreIfSSLModeAuto) Triggers a restart of the frontend server associated with the given entity.
-
Method Details
-
getConnectionsMap
-
getConnection
-
getConnection
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
-
disconnect
-
cleanup
-
disconnectAll
-
reconnect
-
stopReconnect
-
getStatus
-
startConnectThread
-
startConnectThreads
-
stopConnectThreads
public static void stopConnectThreads() -
isUseSSL
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
Method to test the connection to a frontend-server (lookup only)- Parameters:
fs- the frontend-server to test the lookup- Returns:
Booleanif the server can be reached
-
testConnection
-
testConnection
public static boolean testConnection(long fsConnectionID) -
fireEvent
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 firefsId- 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 restartforceCreateKeystoreIfSSLModeAuto- 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
-