org.jinterop.dcom.core
Class JIProgId

java.lang.Object
  extended by org.jinterop.dcom.core.JIProgId

public class JIProgId
extends java.lang.Object

Wrapper class used to define user friendly ProgID.

Definition from MSDN: A ProgID, or programmatic identifier, is a registry entry that can be associated with a CLSID. The format of a ProgID is .., separated by periods and with no spaces, as in Word.Document.6. Like the CLSID, the ProgID identifies a class, but with less precision.

This class uses the WINREG service to get the mapping between the ProgId and the CLSID.

The WINREG package of j-Interop is capable of querying the Windows registry in a platform independent way using SMB. The internal database is looked up first before making calls to WINREG service.

Since:
1.0

Method Summary
 JIClsid getCorrespondingCLSID()
          Returns the CLSID for this ProgId.
 boolean isAutoRegistrationSet()
          Returns the status of the auto registration flag for the component identified by this object.
 void setAutoRegistration(boolean autoRegister)
          Indicates to the framework, if Windows Registry settings for DLL\OCX component identified by this object should be modified to add a Surrogate automatically.
static JIProgId valueOf(java.lang.String progId)
          Factory method returning an instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setAutoRegistration

public void setAutoRegistration(boolean autoRegister)
Indicates to the framework, if Windows Registry settings for DLL\OCX component identified by this object should be modified to add a Surrogate automatically. A Surrogate is a process which provides resources such as memory and cpu for a DLL\OCX to execute.

Parameters:
autoRegister - true if auto registration should be done by the framework.

isAutoRegistrationSet

public boolean isAutoRegistrationSet()
Returns the status of the auto registration flag for the component identified by this object.

Returns:
true if the auto registration flag is set.

valueOf

public static JIProgId valueOf(java.lang.String progId)
Factory method returning an instance of this class.

Parameters:
progId - user-friendly string representation such as "Excel.Application"
Returns:

getCorrespondingCLSID

public JIClsid getCorrespondingCLSID()
                              throws JIException
Returns the CLSID for this ProgId.

Returns:
Throws:
JIException