/**Creates a local class instance. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param instance instance for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>instance</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Object instance) { if (interfaceDefinition == null || instance == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = instance.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,null,instance,false); }
/**Creates a local class instance. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param instance instance for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>instance</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Object instance) { if (interfaceDefinition == null || instance == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = instance.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,null,instance,false); }
/** Creates a local class instance. The framework will try to create a instance of the <code>clazz</code> * using <code>Class.newInstance</code>. Make sure that <code>clazz</code> has a visible <code>null</code> * constructor. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param clazz <code>class</code> to instantiate for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>clazz</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Class clazz) { if (interfaceDefinition == null || clazz == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = clazz.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,clazz,null,false); }
/** Creates a local class instance. The framework will try to create a instance of the <code>clazz</code> * using <code>Class.newInstance</code>. Make sure that <code>clazz</code> has a visible <code>null</code> * constructor. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param clazz <code>class</code> to instantiate for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>clazz</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Class clazz) { if (interfaceDefinition == null || clazz == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = clazz.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,clazz,null,false); }
/** Refer {@link #JILocalCoClass(JILocalInterfaceDefinition, Class)}. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param clazz <code>class</code> to instantiate for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @param useInterfaceDefinitionIID <code>true</code> if the <code>IID</code> of <code>interfaceDefinition</code * should be used as to create the local COM Object. Use this when a reference other than <code>IUnknown*</code> is required. * For all {@link JIObjectFactory#attachEventHandler(IJIComObject, String, IJIComObject)} operations this should be set to * <code>false</code> since the <code>IConnectionPoint::Advise</code> method takes in a <code>IUnknown*</code> reference. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>clazz</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Class clazz, boolean useInterfaceDefinitionIID) { if (interfaceDefinition == null || clazz == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = clazz.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,clazz,null,useInterfaceDefinitionIID); }
/**Creates a local class instance. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param instance instance for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @param useInterfaceDefinitionIID <code>true</code> if the <code>IID</code> of <code>interfaceDefinition</code * should be used as to create the local COM Object. Use this when a reference other than <code>IUnknown*</code> is required. * For all {@link JIObjectFactory#attachEventHandler(IJIComObject, String, IJIComObject)} operations this should be set to * <code>false</code> since the <code>IConnectionPoint::Advise</code> method takes in a <code>IUnknown*</code> reference. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>instance</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Object instance,boolean useInterfaceDefinitionIID) { if (interfaceDefinition == null || instance == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = instance.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,null,instance,useInterfaceDefinitionIID); }
/** Refer {@link #JILocalCoClass(JILocalInterfaceDefinition, Class)}. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param clazz <code>class</code> to instantiate for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @param useInterfaceDefinitionIID <code>true</code> if the <code>IID</code> of <code>interfaceDefinition</code * should be used as to create the local COM Object. Use this when a reference other than <code>IUnknown*</code> is required. * For all {@link JIObjectFactory#attachEventHandler(IJIComObject, String, IJIComObject)} operations this should be set to * <code>false</code> since the <code>IConnectionPoint::Advise</code> method takes in a <code>IUnknown*</code> reference. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>clazz</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Class clazz, boolean useInterfaceDefinitionIID) { if (interfaceDefinition == null || clazz == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = clazz.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,clazz,null,useInterfaceDefinitionIID); }
/**Creates a local class instance. * * @param interfaceDefinition implementing structurally the definition of the COM callback interface. * @param instance instance for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @param useInterfaceDefinitionIID <code>true</code> if the <code>IID</code> of <code>interfaceDefinition</code * should be used as to create the local COM Object. Use this when a reference other than <code>IUnknown*</code> is required. * For all {@link JIObjectFactory#attachEventHandler(IJIComObject, String, IJIComObject)} operations this should be set to * <code>false</code> since the <code>IConnectionPoint::Advise</code> method takes in a <code>IUnknown*</code> reference. * @throws IllegalArgumentException if <code>interfaceDefinition</code> or <code>instance</code> are <code>null</code>. */ public JILocalCoClass(JILocalInterfaceDefinition interfaceDefinition,Object instance,boolean useInterfaceDefinitionIID) { if (interfaceDefinition == null || instance == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO)); } this.identifier = instance.hashCode() ^ new Object().hashCode() ^ randomGen.nextInt(); init(interfaceDefinition,null,instance,useInterfaceDefinitionIID); }
/** * Creates a local class instance. * * @param interfaceDefinition * implementing structurally the definition of the COM callback * interface. * @param instance * instance for serving requests from COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException * if <code>interfaceDefinition</code> or <code>instance</code> * are <code>null</code>. */ public JILocalCoClass ( final JILocalInterfaceDefinition interfaceDefinition, final Object instance ) { if ( interfaceDefinition == null || instance == null ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO ) ); } this.identifier = instance.hashCode () ^ new Object ().hashCode () ^ randomGen.nextInt (); init ( interfaceDefinition, null, instance, false ); }
/** * Creates a local class instance. The framework will try to create a * instance of the <code>clazz</code> using <code>Class.newInstance</code>. * Make sure that <code>clazz</code> has a visible <code>null</code> * constructor. * * @param interfaceDefinition * implementing structurally the definition of the COM callback * interface. * @param clazz * <code>class</code> to instantiate for serving requests from * COM client. Must implement * the <code>interfaceDefinition</code> fully. * @throws IllegalArgumentException * if <code>interfaceDefinition</code> or <code>clazz</code> are * <code>null</code>. */ public JILocalCoClass ( final JILocalInterfaceDefinition interfaceDefinition, final Class clazz ) { if ( interfaceDefinition == null || clazz == null ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_COM_RUNTIME_INVALID_CONTAINER_INFO ) ); } this.identifier = clazz.hashCode () ^ new Object ().hashCode () ^ randomGen.nextInt (); init ( interfaceDefinition, clazz, null, false ); }
init ( interfaceDefinition, clazz, null, useInterfaceDefinitionIID );
init ( interfaceDefinition, null, instance, useInterfaceDefinitionIID );