|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jinterop.dcom.common.JISystem
public final class JISystem
General purpose utility class. Fields set here are applied system wide. The j-Interop library exposes JRE based logger "org.jinterop". Applications need to
attach their own handler to this logger. If you would like to set the in-built handler, which writes to a file j-Interop.log in the java.io.tmpdir
directory, please use the JISystem.setInBuiltLogHandler(boolean)
. Please note that the level
for the logger and all other
configuration parameters should be set directly on the logger instance, using LogManager.getLogger("org.jinterop")
Method Summary | |
---|---|
static java.lang.String |
getClsidFromProgId(java.lang.String progId)
Queries the property file maintaining the progId Vs Clsid DB and returns the JIClsid or null |
static JIComVersion |
getCOMVersion()
Returns COM version currently being used by the library. |
static java.util.ResourceBundle |
getErrorMessages()
Returns the ResourceBundle associated with current locale. |
static java.util.Locale |
getLocale()
Returns current locale associated with the library. |
static java.lang.String |
getLocalizedMessage(int code)
Returns the localized error messages for the error code. |
static java.util.logging.Logger |
getLogger()
Returns the j-Interop logger identified by the name "org.jinterop". |
static boolean |
isAutoRegistrationSet()
Returns true is auto registration is enabled. |
static boolean |
isJavaCoClassAutoCollectionSet()
Status of autoCollection flag. |
static void |
setAutoRegisteration(boolean autoRegisteration)
Pass true if, this is an OCX\DLL component and you want the library to do auto registration. |
static void |
setCOMVersion(JIComVersion comVersion)
Sets the COM version which the library would use for communicating with COM servers. |
static void |
setInBuiltLogHandler(boolean useParentHandlers)
Used to set the in built log handler. |
static void |
setJavaCoClassAutoCollection(boolean autoCollection)
Sometimes the DCOM runtime of Windows will not send a ping on time to the j-Interop runtime. |
static void |
setLocale(java.util.Locale locale)
Sets the locale, this locale will be used to retrieve the resource bundle for Error Messages. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.logging.Logger getLogger()
public static void setCOMVersion(JIComVersion comVersion)
comVersion
- public static JIComVersion getCOMVersion()
public static void setLocale(java.util.Locale locale)
locale
- default is Locale.getDefault().public static java.util.Locale getLocale()
public static java.util.ResourceBundle getErrorMessages()
public static java.lang.String getLocalizedMessage(int code)
code
- error code
public static java.lang.String getClsidFromProgId(java.lang.String progId)
progId
-
public static void setAutoRegisteration(boolean autoRegisteration)
autoRegisteration
- public static boolean isAutoRegistrationSet()
public static void setJavaCoClassAutoCollection(boolean autoCollection)
Sometimes the DCOM runtime of Windows will not send a ping on time to the j-Interop runtime. It is not very abnormal, since Windows can sometimes resort to mechanisms other than DCOM to keep a reference count for the instances they imported. In case of j-Interop, if a ping is not recieved in 8 minutes , the Java CoClass is collected for GC. And when the COM server asks for it, it is sent back an Exception. Please use this flag to set the Auto Collection status to ON or OFF. By Default, it is ON.
autoCollection
- public static boolean isJavaCoClassAutoCollectionSet()
public static void setInBuiltLogHandler(boolean useParentHandlers) throws java.lang.SecurityException, java.io.IOException
useParentHandlers
- true if parent handlers should be used.
java.io.IOException
java.lang.SecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |