Class ServerPlatformUtils
- java.lang.Object
-
- org.eclipse.persistence.platform.server.ServerPlatformUtils
-
public final class ServerPlatformUtils extends java.lang.Object
A 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 ServerPlatform
createServerPlatform(DatabaseSession session, java.lang.String platformClass, java.lang.ClassLoader loader)
Create an instance ofServerPlatform
from parameters passed in.static java.lang.String
detectServerPlatform(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 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:
ServerPlatformBase(DatabaseSession)
-
-