Class Factory
- java.lang.Object
- 
- com.sun.jna.platform.win32.COM.util.ObjectFactory
- 
- com.sun.jna.platform.win32.COM.util.Factory
 
 
- 
 public class Factory extends ObjectFactory Factory is intended as a simpler to use version of ObjectFactory.The Factory abstracts the necessity to handle COM threading by introducing a dispatching thread, that is correctly COM initialized and is used to handle all outgoing calls. NOTE: Remember to call factory.getComThread().terminate() at some appropriate point, when the factory is not used anymore 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) IDispatchCallbackcreateDispatchCallback(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener)<T> TcreateObject(java.lang.Class<T> comInterface)Creates a new COM object (CoCreateInstance) for the given progId and returns a ProxyObject for the given interface.<T> TcreateProxy(java.lang.Class<T> comInterface, IDispatch dispatch)Creates a ProxyObject for the given interface and IDispatch pointer.(package private) Guid.GUIDdiscoverClsId(ComObject annotation)<T> TfetchObject(java.lang.Class<T> comInterface)Gets and existing COM object (GetActiveObject) for the given progId and returns a ProxyObject for the given interface.ComThreadgetComThread()IRunningObjectTablegetRunningObjectTable()CoInitialize must be called be fore this method.- 
Methods inherited from class com.sun.jna.platform.win32.COM.util.ObjectFactorydisposeAll, finalize, getLCID, register, setLCID, unregister
 
- 
 
- 
- 
- 
Constructor Detail- 
Factorypublic Factory() 
 - 
Factorypublic Factory(ComThread comThread) 
 
- 
 - 
Method Detail- 
createProxypublic <T> T createProxy(java.lang.Class<T> comInterface, IDispatch dispatch)Description copied from class:ObjectFactoryCreates a ProxyObject for the given interface and IDispatch pointer.- Overrides:
- createProxyin class- ObjectFactory
 
 - 
discoverClsIdGuid.GUID discoverClsId(ComObject annotation) - Overrides:
- discoverClsIdin class- ObjectFactory
 
 - 
fetchObjectpublic <T> T fetchObject(java.lang.Class<T> comInterface) throws COMExceptionDescription copied from class:ObjectFactoryGets and existing COM object (GetActiveObject) for the given progId and returns a ProxyObject for the given interface.- Overrides:
- fetchObjectin class- ObjectFactory
- Throws:
- COMException
 
 - 
createObjectpublic <T> T createObject(java.lang.Class<T> comInterface) Description copied from class:ObjectFactoryCreates a new COM object (CoCreateInstance) for the given progId and returns a ProxyObject for the given interface.- Overrides:
- createObjectin class- ObjectFactory
 
 - 
createDispatchCallbackIDispatchCallback createDispatchCallback(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener) - Overrides:
- createDispatchCallbackin class- ObjectFactory
 
 - 
getRunningObjectTablepublic IRunningObjectTable getRunningObjectTable() Description copied from class:ObjectFactoryCoInitialize must be called be fore this method. Either explicitly or implicitly via other methods.- Overrides:
- getRunningObjectTablein class- ObjectFactory
- Returns:
- running object table
 
 - 
getComThreadpublic ComThread getComThread() 
 
- 
 
-