com.jniwrapper.win32.com.server
Class IUnknownServer

java.lang.Object
  extended bycom.jniwrapper.win32.com.server.IUnknownServer
All Implemented Interfaces:
AutoDeleteParameter, IUnknown
Direct Known Subclasses:
IClassFactoryServer, IDispatchServer, OleClientSiteImpl, StructureInfo

public class IUnknownServer
extends java.lang.Object
implements IUnknown

This class provides default server-side implementation of IUnknown interface.


Field Summary
 
Fields inherited from interface com.jniwrapper.win32.com.IUnknown
INTERFACE_IDENTIFIER
 
Constructor Summary
IUnknownServer(CoClassMetaInfo classImpl)
           
 
Method Summary
 ULongInt addRef()
          Increments the reference count for an interface on an object.
 ULongInt addRefAggregated()
          Calls the addRef method for an aggregate object.
 void create(IUnknown outerInterface, IID iid, IUnknown defInterface)
          Creates a co-class and returns its default interface.
protected  void destroy()
           
protected  void doDestroy()
           
 boolean doQueryInterface(IID iid, IUnknown intf)
          Returns interface by IID.
protected  CoClassMetaInfo getClassImpl()
           
 long getRefCount()
          Returns reference count to this object.
 boolean isAutoDelete()
           
 boolean isNull()
           
 void queryInterface(IID iid, IUnknown pReqInterface)
          Retrieves pointers to the supported interfaces on an object.
 void queryInterfaceAggregated(IID iid, IUnknown pReqInterface)
          If an aggregate object exists, calls the queryInterface method for it; otherwise calls the queryInterface method for a current object.
 ULongInt release()
          Decrements the reference count for an interface on an object.
 ULongInt releaseAggregated()
          Calls release for an aggregate object.
 void setAutoDelete(boolean autoDelete)
           
 void setNull()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IUnknownServer

public IUnknownServer(CoClassMetaInfo classImpl)
Method Detail

getClassImpl

protected CoClassMetaInfo getClassImpl()

addRef

public ULongInt addRef()
Description copied from interface: IUnknown
Increments the reference count for an interface on an object.

Specified by:
addRef in interface IUnknown
Returns:
new reference count. This value is intended to be used only for test purposes.

addRefAggregated

public ULongInt addRefAggregated()
Calls the addRef method for an aggregate object.

Returns:
count of references for an aggregate object.

release

public ULongInt release()
Description copied from interface: IUnknown
Decrements the reference count for an interface on an object.

Specified by:
release in interface IUnknown
Returns:
new reference count. This value is intended to be used only for test purposes.

doDestroy

protected void doDestroy()

releaseAggregated

public ULongInt releaseAggregated()
Calls release for an aggregate object.

Returns:
count of references for an aggregate object.

queryInterface

public void queryInterface(IID iid,
                           IUnknown pReqInterface)
                    throws ComException
Description copied from interface: IUnknown
Retrieves pointers to the supported interfaces on an object.

Specified by:
queryInterface in interface IUnknown
Parameters:
iid - [in]
pReqInterface - [out]
Throws:
ComException - if the interface is not supported

queryInterfaceAggregated

public void queryInterfaceAggregated(IID iid,
                                     IUnknown pReqInterface)
                              throws ComException
If an aggregate object exists, calls the queryInterface method for it; otherwise calls the queryInterface method for a current object.

Parameters:
iid - IID of a requested interface.
pReqInterface - a requested interface.
Throws:
ComException - when operation fails

doQueryInterface

public boolean doQueryInterface(IID iid,
                                IUnknown intf)
Returns interface by IID.
NOTE: This method does not call addRef() method of this Java COM object.

Parameters:
iid - IID of a requested interface.
intf - a requested interface if true is returned.
Returns:
true if the interface with a specified IID exists, otherwise false.

destroy

protected void destroy()

create

public void create(IUnknown outerInterface,
                   IID iid,
                   IUnknown defInterface)
            throws ComException
Creates a co-class and returns its default interface.

Parameters:
outerInterface - an outer interface
iid - IID of the requested interface.
defInterface - output with the default interface for the created co-class (out-only parameter).
Throws:
ComException - when server cannot create a new object due to some reason

isNull

public boolean isNull()
Specified by:
isNull in interface IUnknown

setNull

public void setNull()
Specified by:
setNull in interface IUnknown

setAutoDelete

public void setAutoDelete(boolean autoDelete)
Specified by:
setAutoDelete in interface AutoDeleteParameter

isAutoDelete

public boolean isAutoDelete()
Specified by:
isAutoDelete in interface AutoDeleteParameter

getRefCount

public long getRefCount()
Returns reference count to this object.

Returns:
reference count