Class ServerPlatformUtils
- java.lang.Object
-
- org.eclipse.persistence.platform.server.ServerPlatformUtils
-
public final class ServerPlatformUtils extends java.lang.ObjectA utility class to interact with ServerPlatforms.
-
-
Constructor Summary
Constructors Constructor Description ServerPlatformUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServerPlatformcreateServerPlatform(DatabaseSession session, java.lang.String platformClass, java.lang.ClassLoader loader)Create an instance ofServerPlatformfrom parameters passed in.static java.lang.StringdetectServerPlatform(org.eclipse.persistence.internal.sessions.AbstractSession session)
-
-
-
Method Detail
-
detectServerPlatform
public static java.lang.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, java.lang.String platformClass, java.lang.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:
ServerPlatformBase(DatabaseSession)
-
-