Class ServerPlatformUtils
java.lang.Object
org.eclipse.persistence.platform.server.ServerPlatformUtils
A utility class to interact with ServerPlatforms.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerPlatform
createServerPlatform
(DatabaseSession session, String platformClass, ClassLoader loader) Create an instance ofServerPlatform
from parameters passed in.static String
detectServerPlatform
(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 ofServerPlatform
from parameters passed in.- Parameters:
session
-DatabaseSession
which will be passed to the constructor ofServerPlatform
platformClass
- fully qualified name of theServerPlatform
implementation to initializeloader
-ClassLoader
to 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:
-