|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.IlpSystem
public class IlpSystem
This class is used to initialize an ILOG CPL application or applet.
In most cases, it will read a deployment descriptor file to obtain configuration settings such as search paths and style files. This class also provides access to some global constants and properties.
To increase the verbosity of operation of this class, you can set its
logging level by adding the line
ilog.cpl.IlpSystem.level = level
to your logging.properties file.
| Constructor Summary | |
|---|---|
protected |
IlpSystem()
This class should not be instantiated. |
| Method Summary | |
|---|---|
protected static IlpDefaultContext |
CreateDefaultContext()
Creates a default context. |
static void |
DontSetLocale()
Makes an application run in a non-locale environment. |
static long |
GetBuildNumber()
Deprecated. Use IlpTGOProduct.getBuildNumber() instead. |
static IlpContext |
GetDefaultContext()
Returns the default service context. |
static Font |
GetDefaultFont()
Returns the default font. |
static URL |
GetHome()
Returns directory where ILOG JTGO is installed. |
static String |
GetHostName()
Returns the name of the host on which this process is running, if it can be determined. |
static int |
GetMajorVersion()
Deprecated. Use IlpTGOProduct.getVersion() instead. |
static int |
GetMinorVersion()
Deprecated. Use IlpTGOProduct.getMinorVersion() instead. |
static int |
GetPatchLevel()
Deprecated. Use IlpTGOProduct.getPatchLevel() instead. |
static int |
GetReleaseDate()
Deprecated. Use IlpTGOProduct.getBuildNumber() instead. |
static int |
GetSubMinorVersion()
Deprecated. Use IlpTGOProduct.getSubMinorVersion() instead. |
static int |
GetVersion()
Deprecated. Use IlpTGOProduct.getVersionNumber() instead. |
static String |
GetVersionString()
Deprecated. Use IlpTGOProduct.getVersionString() instead. |
static void |
Init()
Initializes a CPL process and creates a default context using a deployment descriptor. |
static void |
Init(Applet applet)
Initializes a CPL applet and creates a default context using a default deployment descriptor. |
static void |
Init(Applet applet,
String deploymentDescriptorName)
Initializes a CPL applet and creates a default context using a deployment descriptor specified by a relative file name. |
static void |
Init(IlpContext defaultContext)
Initializes the system based on a service context. |
static void |
Init(String deploymentDescriptorName)
Initializes a CPL process and creates a default context using a deployment descriptor specified by a file name. |
static void |
Init(URL documentBase,
String deploymentDescriptorName)
Initializes the system using a deployment descriptor specified by a relative URL, relative to a given base URL. |
static void |
Init(URL deploymentDescriptorURL,
URL defaultDocumentBase)
Initializes the system using a deployment descriptor specified by an URL. |
static boolean |
IsApplet()
Returns true if application has been initialized as
an applet. |
static boolean |
IsDontSetLocale()
Returns true if your program is running in a non-locale environment. |
static boolean |
IsInitialized()
Returns true if the application has been
correctly initialized. |
static boolean |
IsInitializing()
Returns true if inside a call to Init() or
one or its variants. |
static void |
SetDefaultContext(IlpContext ctxt)
Sets the default application context. |
static void |
SetDefaultFont(Font font)
Sets the specified font as the default font. |
static void |
Shutdown()
Shut down the system and remove the default context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected IlpSystem()
Init().
| Method Detail |
|---|
public static void Init()
The system looks for the deployment descriptor as follows:
ilog.cpl.deploymentDescriptorName property
cpldeploy.xml
The file is looked for:
$HOME/.cpl/ of the user's home directory on Unix,
To use a custom deployment descriptor you could also use one of the versions of this method that takes a deployment descriptor name as a parameter.
If no custom deployment descriptor is found, a default one of type
IlpDefaultContext is created.
This method should not be used to initialize an applet.
Use the versions of Init that take an Applet
parameter or an absolute URL instead.
If this method is called more than once the initialization is performed only once.
public static void Init(String deploymentDescriptorName)
throws FileNotFoundException,
IOException,
IlpDeploymentParsingException
The deployment descriptor name provided may be an absolute path, or relative to the current directory for the application. Under Windows, the drive letter in an absolute path is considered as the type of the file; to avoid confusion, you must specify "file:" at the very beginning of the path.
This method should not be used to initialize an applet.
Use the versions of Init that take an Applet
parameter or an absolute URL instead.
deploymentDescriptorName - Absolute or relative file name.
FileNotFoundException
IOException
IlpDeploymentParsingException
public static void Init(URL documentBase,
String deploymentDescriptorName)
throws FileNotFoundException,
IOException,
IlpDeploymentParsingException
FileNotFoundException
IOException
IlpDeploymentParsingException
public static void Init(URL deploymentDescriptorURL,
URL defaultDocumentBase)
throws FileNotFoundException,
IOException,
IlpDeploymentParsingException
This method may be used to initialize either an application or an applet.
deploymentDescriptorURL - URL of deployment descriptor.
FileNotFoundException
IOException
IlpDeploymentParsingExceptionpublic static void Init(Applet applet)
The document base of the applet is used as the document base for the default URL access service created.
The default deployment descriptor is obtained from the CPL jar. To use a custom deployment descriptor, use one of the versions of this method that takes a deployment descriptor name as a parameter.
public static void Init(Applet applet,
String deploymentDescriptorName)
throws FileNotFoundException,
IOException,
IlpDeploymentParsingException
The document base of the applet is used as the document base for the default URL access service.
FileNotFoundException
IOException
IlpDeploymentParsingExceptionpublic static void Init(IlpContext defaultContext)
The user should ensure that the context is properly configured for subsequent use.
defaultContext - The default service context used in
the application.public static void Shutdown()
public static boolean IsInitialized()
true if the application has been
correctly initialized.
public static boolean IsInitializing()
true if inside a call to Init() or
one or its variants.
public static boolean IsApplet()
true if application has been initialized as
an applet.
protected static IlpDefaultContext CreateDefaultContext()
ilog.tgo.context.IltDefaultContext
if JTGO is available. Otherwise, it creates an IlpDefaultContext.
public static IlpContext GetDefaultContext()
Init()public static void SetDefaultContext(IlpContext ctxt)
This method must not be called directly, instead it is only
called inside IlpDefaultContext constructor.
public static String GetHostName()
public static URL GetHome()
public static void DontSetLocale()
public static boolean IsDontSetLocale()
true if your program is running in a non-locale environment.
DontSetLocale()public static Font GetDefaultFont()
null if there is no default font.SetDefaultFont(Font)public static void SetDefaultFont(Font font)
public static int GetVersion()
IlpTGOProduct.getVersionNumber() instead.
GetVersion()public static String GetVersionString()
IlpTGOProduct.getVersionString() instead.
public static final int GetMajorVersion()
IlpTGOProduct.getVersion() instead.
public static final int GetMinorVersion()
IlpTGOProduct.getMinorVersion() instead.
public static final int GetSubMinorVersion()
IlpTGOProduct.getSubMinorVersion() instead.
public static final int GetPatchLevel()
IlpTGOProduct.getPatchLevel() instead.
public static final long GetBuildNumber()
IlpTGOProduct.getBuildNumber() instead.
public static final int GetReleaseDate()
IlpTGOProduct.getBuildNumber() instead.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||