@Override public boolean isLocalReference () { return this.comObject.isLocalReference (); }
public boolean isLocalReference() { return comObject.isLocalReference(); }
public boolean isLocalReference() { return comObject.isLocalReference(); }
/**<i>Narrows</i> the <code>comObject</code> into its right type based on it's <code>IID</code>. For example, passing a * <code>comObject</code> which is a COM <code>IDispatch</code> reference will return a reference which can be safely casted * to <code>IJIDispatch</code> interface. * * @param comObject * @return * @throws JIException * @throws IllegalArgumentException if <code>comObject</code> is <code>null</code> or a local reference. */ public static IJIComObject narrowObject(final IJIComObject comObject) throws JIException { if (comObject == null || comObject.isLocalReference()) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMFACTORY_ILLEGAL_ARG)); } //Will later on add another way to dynamically moving to factories. IJIComObject retval = Internal_JIAutomationFactory.narrowObject(comObject); return retval; }
/**<i>Narrows</i> the <code>comObject</code> into its right type based on it's <code>IID</code>. For example, passing a * <code>comObject</code> which is a COM <code>IDispatch</code> reference will return a reference which can be safely casted * to <code>IJIDispatch</code> interface. * * @param comObject * @return * @throws JIException * @throws IllegalArgumentException if <code>comObject</code> is <code>null</code> or a local reference. */ public static IJIComObject narrowObject(final IJIComObject comObject) throws JIException { if (comObject == null || comObject.isLocalReference()) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMFACTORY_ILLEGAL_ARG)); } //Will later on add another way to dynamically moving to factories. IJIComObject retval = Internal_JIAutomationFactory.narrowObject(comObject); return retval; }
/** * <i>Narrows</i> the <code>comObject</code> into its right type based on * it's <code>IID</code>. For example, passing a <code>comObject</code> * which is a COM <code>IDispatch</code> reference will return a reference * which can be safely casted * to <code>IJIDispatch</code> interface. * * @param comObject * @return * @throws JIException * @throws IllegalArgumentException * if <code>comObject</code> is <code>null</code> or a local * reference. */ public static IJIComObject narrowObject ( final IJIComObject comObject ) throws JIException { if ( comObject == null || comObject.isLocalReference () ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_COMFACTORY_ILLEGAL_ARG ) ); } //Will later on add another way to dynamically moving to factories. final IJIComObject retval = Internal_JIAutomationFactory.narrowObject ( comObject ); return retval; }
/** Typically used in the Man-In-The-Middle scenario, where one j-Interop system interacts with another over the wire. * Or the IJIComObject is deserialized from a Database and is right now drifting. * * @exclude * @param session * @param comObject * @return * @throws JIException */ public static IJIComObject instantiateComObject(JISession session,IJIComObject comObject) throws JIException { if (comObject.getAssociatedSession() != null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_SESSION_ALREADY_ATTACHED)); } if (comObject.isLocalReference()) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMOBJ_LOCAL_REF)); } return instantiateComObject(session, comObject.internal_getInterfacePointer()); }
/** Typically used in the Man-In-The-Middle scenario, where one j-Interop system interacts with another over the wire. * Or the IJIComObject is deserialized from a Database and is right now drifting. * * @exclude * @param session * @param comObject * @return * @throws JIException */ public static IJIComObject instantiateComObject(JISession session,IJIComObject comObject) throws JIException { if (comObject.getAssociatedSession() != null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_SESSION_ALREADY_ATTACHED)); } if (comObject.isLocalReference()) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMOBJ_LOCAL_REF)); } return instantiateComObject(session, comObject.internal_getInterfacePointer()); }
/** * Typically used in the Man-In-The-Middle scenario, where one j-Interop * system interacts with another over the wire. * Or the IJIComObject is deserialized from a Database and is right now * drifting. * * @exclude * @param session * @param comObject * @return * @throws JIException */ public static IJIComObject instantiateComObject ( final JISession session, final IJIComObject comObject ) throws JIException { if ( comObject.getAssociatedSession () != null ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_SESSION_ALREADY_ATTACHED ) ); } if ( comObject.isLocalReference () ) { throw new IllegalArgumentException ( JISystem.getLocalizedMessage ( JIErrorCodes.JI_COMOBJ_LOCAL_REF ) ); } return instantiateComObject ( session, comObject.internal_getInterfacePointer () ); }