com.jniwrapper.win32.com.server
Class IClassFactoryServer

java.lang.Object
  extended bycom.jniwrapper.win32.com.server.IUnknownServer
      extended bycom.jniwrapper.win32.com.server.IClassFactoryServer
All Implemented Interfaces:
AutoDeleteParameter, CoClassMetaInfo, IClassFactory, IUnknown

public class IClassFactoryServer
extends IUnknownServer
implements IClassFactory, CoClassMetaInfo

This class provides default server-side implementation of the IClassFactory interface.


Field Summary
 
Fields inherited from interface com.jniwrapper.win32.com.IClassFactory
INTERFACE_IDENTIFIER
 
Constructor Summary
IClassFactoryServer(java.lang.Class instanceClass)
          Creates the class factory for the specified COM server.
 
Method Summary
 IClassFactory createIClassFactory()
           
 void createInstance(IUnknown outer, IID iid, IUnknown result)
          Creates an uninitialized object.
 void createInstance(IUnknown outer, java.lang.String stringIID, IUnknown result)
          Creates an uninitialized object.
protected  void destroy()
           
protected  void doDestroy()
           
 IID getDefaultInterfaceIID()
          Gets default interface.
 IUnknownServer getInstanceByInterfacePointer(Pointer.Void ptrInterface)
           
 java.lang.Class getInstanceClass()
           
 java.util.Stack getInstances()
          Returns stack of server instances.
 java.util.Map getMapIIDToVTBLPointer()
          Returns java.util.Map that contains associations between virtual tables and IIDs of corresponding interfaces.
 void lockServer(VariantBool fLock)
          Locks server.
 void registerInstance(IUnknownServer instance)
           
 void registerInterface(java.lang.Class interfaceClass, IUnknownVTBL intfVTBL)
          Associates a virtual table with interface.
 void setDefaultInterface(java.lang.Class interfaceClass)
          Sets default interface.
 void unregisterInstance(IUnknownServer instance)
           
 
Methods inherited from class com.jniwrapper.win32.com.server.IUnknownServer
addRef, addRefAggregated, create, doQueryInterface, getClassImpl, getRefCount, isAutoDelete, isNull, queryInterface, queryInterfaceAggregated, release, releaseAggregated, setAutoDelete, setNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jniwrapper.win32.com.IUnknown
addRef, isNull, queryInterface, release, setNull
 
Methods inherited from interface com.jniwrapper.AutoDeleteParameter
isAutoDelete, setAutoDelete
 

Constructor Detail

IClassFactoryServer

public IClassFactoryServer(java.lang.Class instanceClass)
Creates the class factory for the specified COM server.

Parameters:
instanceClass - specifies COM server.
Method Detail

getMapIIDToVTBLPointer

public java.util.Map getMapIIDToVTBLPointer()
Returns java.util.Map that contains associations between virtual tables and IIDs of corresponding interfaces.

Specified by:
getMapIIDToVTBLPointer in interface CoClassMetaInfo
Returns:
java.util.Map that contains associations between virtual tables and IIDs of corresponding interfaces.

registerInterface

public void registerInterface(java.lang.Class interfaceClass,
                              IUnknownVTBL intfVTBL)
Associates a virtual table with interface.

Specified by:
registerInterface in interface CoClassMetaInfo
Parameters:
interfaceClass - java class for COM interface.
intfVTBL - an instance of the virtual table.

setDefaultInterface

public void setDefaultInterface(java.lang.Class interfaceClass)
Sets default interface.

Specified by:
setDefaultInterface in interface CoClassMetaInfo
Parameters:
interfaceClass - java class for interface.

getDefaultInterfaceIID

public IID getDefaultInterfaceIID()
Gets default interface.

Specified by:
getDefaultInterfaceIID in interface CoClassMetaInfo
Returns:
java class for interface.

registerInstance

public void registerInstance(IUnknownServer instance)
Specified by:
registerInstance in interface CoClassMetaInfo

unregisterInstance

public void unregisterInstance(IUnknownServer instance)
Specified by:
unregisterInstance in interface CoClassMetaInfo

getInstanceByInterfacePointer

public IUnknownServer getInstanceByInterfacePointer(Pointer.Void ptrInterface)
Specified by:
getInstanceByInterfacePointer in interface CoClassMetaInfo

createInstance

public void createInstance(IUnknown outer,
                           java.lang.String stringIID,
                           IUnknown result)
                    throws ComException
Description copied from interface: IClassFactory
Creates an uninitialized object.

Specified by:
createInstance in interface IClassFactory
Parameters:
outer - [in] parameter, points to controlling interface of an aggregate, or null if the object isn't being created as part of an aggregate.
stringIID - [in] parameter, string representation of identifier for the interface used for communication with a new object.
result - [out] parameter, instance implementing a required interface.
Throws:
ComException - if the object creation fails.

createInstance

public void createInstance(IUnknown outer,
                           IID iid,
                           IUnknown result)
                    throws ComException
Description copied from interface: IClassFactory
Creates an uninitialized object.

Specified by:
createInstance in interface IClassFactory
Parameters:
outer - [in] parameter, points to controlling interface of an aggregate, or null if the object isn't being created as part of an aggregate.
iid - [in] parameter, identifier for the interface used for communication with a new object.
result - [out] parameter, instance implementing a required interface.
Throws:
ComException - if the object creation fails.

getInstances

public java.util.Stack getInstances()
Returns stack of server instances. Each new instance created with IClassFactory.createInstance function is placed on the top of the stack.

Returns:
a stack of server instances.

lockServer

public void lockServer(VariantBool fLock)
                throws ComException
Locks server.

Specified by:
lockServer in interface IClassFactory
Parameters:
fLock -
Throws:
ComException

getInstanceClass

public java.lang.Class getInstanceClass()
Specified by:
getInstanceClass in interface CoClassMetaInfo

createIClassFactory

public IClassFactory createIClassFactory()

doDestroy

protected void doDestroy()
Overrides:
doDestroy in class IUnknownServer

destroy

protected void destroy()
Overrides:
destroy in class IUnknownServer