Class ServerPlatformUtils
java.lang.Object
org.eclipse.persistence.platform.server.ServerPlatformUtils
A utility class to interact with ServerPlatforms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerPlatformcreateServerPlatform(DatabaseSession session, String platformClass, ClassLoader loader) Create an instance ofServerPlatformfrom parameters passed in.static StringdetectServerPlatform(org.eclipse.persistence.internal.sessions.AbstractSession session)
-
Constructor Details
-
ServerPlatformUtils
public ServerPlatformUtils()
-
-
Method Details
-
detectServerPlatform
public static String detectServerPlatform(org.eclipse.persistence.internal.sessions.AbstractSession session) - Parameters:
session-- Returns:
- The target-server class string that represents platform that is currently running. Return null if unknown.
-
createServerPlatform
public static ServerPlatform createServerPlatform(DatabaseSession session, String platformClass, ClassLoader loader) Create an instance ofServerPlatformfrom parameters passed in.- Parameters:
session-DatabaseSessionwhich will be passed to the constructor ofServerPlatformplatformClass- fully qualified name of theServerPlatformimplementation to initializeloader-ClassLoaderto look up given platformClass- Returns:
- initialized instance of
ServerPlatform - Throws:
ServerPlatformException- if supplied platformClass is not found, can not be initialized, or is null.- See Also:
-