|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.linar.jintegra.Dispatch
public class Dispatch
The Dispatch class represents a reference to a COM object via a COM interface. It is used via a class which derives from this class, which is used to access COM objects via a specific COM interface.
This class can be used to access COM objects both via the COM IDispatch standard interface, and via custom COM interfaces.
This class is not exposed directly to end-users of J-Integra®. It is meant to be used internally by the J-Integra® runtime, and by parties that have been authorized to access the J-Integra® runtime directly.
Field Summary | |
---|---|
static int |
DISPATCH_METHOD
Used in invoke, Indicates that it is a method that is being invoked |
static int |
DISPATCH_PROPERTYGET
Used in invoke, Indicates that a property is being got |
static int |
DISPATCH_PROPERTYPUT
Used in invoke, Indicates that a property is being set |
static int |
DISPATCH_PROPERTYPUTREF
Used in invoke, Indicates that a property is being set by reference (an object reference) |
Constructor Summary | |
---|---|
protected |
Dispatch()
Used in proxies generated by 'java2com' |
|
Dispatch(java.lang.Object other)
|
|
Dispatch(java.lang.Object other,
java.lang.String iidStr)
Access an existing COM object reference via the specified COM interface. |
|
Dispatch(java.lang.String clsidStr,
java.lang.String host)
Create an instance of a COM class. |
|
Dispatch(java.lang.String clsidStr,
java.lang.String iidStr,
java.lang.String host,
AuthInfo authInfo)
Create an instance of a COM class. |
protected |
Dispatch(java.lang.String clsidStr,
java.lang.String iidStr,
java.lang.String hostname,
boolean deferred)
|
Method Summary | |
---|---|
void |
addListener(java.lang.String iidStr,
java.lang.Object theListener,
java.lang.Object theSource)
Adds a Java object to be a listener for a specific kind of event generated by the COM object. |
static java.lang.Object |
bindUsingMoniker(java.lang.String moniker)
|
void |
convertToNative()
|
long |
cookieForListener(java.lang.Object theListener)
Returns the COM cookie associated with a specific listener. |
protected void |
createDispatch(java.lang.String clsidStr,
java.lang.String iidStr,
java.lang.String host,
AuthInfo authInfo)
|
static java.lang.String |
createObjrefMonikerDisplayName(java.lang.Object forObject)
|
boolean |
equals(java.lang.Object other)
|
static java.lang.Object |
getActiveObject(java.lang.String clsid)
|
static java.lang.Object |
getActiveObject(java.lang.String clsid,
java.lang.String iid)
|
java.lang.Object |
getDefaultProperty()
|
protected int |
getDispatchIdOfName(java.lang.String name)
Gets the IDispatch memid of a method or property |
static int |
getLastErrorCode()
|
static java.lang.Object |
getMtsObjectContext()
|
com.linar.jintegra.StdObjRef |
getObjRef()
|
java.lang.Object |
getPropertyByName(java.lang.String name)
getPropertyByName. |
java.lang.Object |
getPropertyByName(java.lang.String name,
java.lang.Object rhs)
|
int |
hashCode()
|
protected com.linar.jintegra.Variant |
invoke(java.lang.String methodName,
int dispId,
long kind,
com.linar.jintegra.Variant[] parameters)
Invoke a method or set/get a property on the COM object. |
java.lang.Object |
invokeMethodByName(java.lang.String name,
java.lang.Object[] parameters)
|
java.lang.Object |
invokeMethodByName(java.lang.String name,
java.lang.Object[] parameters,
boolean[] byRefMask)
|
java.lang.Object |
invokeMethodByName(java.lang.String name,
com.linar.jintegra.Variant[] parameters)
|
java.lang.Object |
invokePropertyGetByName(java.lang.String name,
com.linar.jintegra.Variant[] parameters)
|
void |
invokePropertyPutByName(java.lang.String name,
com.linar.jintegra.Variant[] parameters)
|
void |
invokePropertyPutByRefByName(java.lang.String name,
com.linar.jintegra.Variant[] parameters)
|
static boolean |
isNativeMode()
|
static boolean |
isObjRef(java.lang.Object other)
|
void |
queryInterface()
|
void |
readExternal(java.io.ObjectInput in)
|
void |
removeListener(java.lang.String iidStr,
java.lang.Object theListener)
Removes a Java object as a listener to events generated by a COM object. |
static void |
setNativeMode()
|
void |
setPropertyByName(java.lang.String name,
java.lang.Object value)
|
java.lang.String |
toString()
|
void |
vtblInvoke(java.lang.String methodName,
int opNum,
java.lang.Object[] paramValues)
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DISPATCH_METHOD
public static final int DISPATCH_PROPERTYGET
public static final int DISPATCH_PROPERTYPUT
public static final int DISPATCH_PROPERTYPUTREF
Constructor Detail |
---|
protected Dispatch()
protected Dispatch(java.lang.String clsidStr, java.lang.String iidStr, java.lang.String hostname, boolean deferred) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public Dispatch(java.lang.String clsidStr, java.lang.String host) throws java.net.UnknownHostException, java.io.IOException
clsidStr
- the UUID of the COM class of the object to be instanciated.host
- the host on which the COM object is to be instanciated. Specify "localhost" for the
current machine.
java.net.UnknownHostException
java.io.IOException
public Dispatch(java.lang.String clsidStr, java.lang.String iidStr, java.lang.String host, AuthInfo authInfo) throws java.net.UnknownHostException, java.io.IOException
clsidStr
- the UUID of the COM class of the object to be instanciated.iidStr
- the UUID of the COM interface through which the new object is to be accessed.host
- the host on which the COM object is to be instanciated. Specify "localhost" for the
current machine.authInfo
- authentication information to be used to create and access the object. Pass null
to use the default authentication.
java.net.UnknownHostException
java.io.IOException
public Dispatch(java.lang.Object other) throws java.io.IOException
java.io.IOException
public Dispatch(java.lang.Object other, java.lang.String iidStr) throws java.io.IOException
other
- a reference to a COM object.iidStr
- the UUID of the COM interface through which the object is to be accessed.
java.lang.IllegalArgumentException
- if the object is not a reference to a COM object.
java.io.IOException
Method Detail |
---|
public com.linar.jintegra.StdObjRef getObjRef()
public java.lang.String toString()
toString
in class java.lang.Object
public static void setNativeMode()
public static boolean isNativeMode()
protected void createDispatch(java.lang.String clsidStr, java.lang.String iidStr, java.lang.String host, AuthInfo authInfo) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public static boolean isObjRef(java.lang.Object other)
public void queryInterface() throws AutomationException, java.io.IOException
AutomationException
java.io.IOException
public java.lang.Object getDefaultProperty() throws java.lang.NoSuchFieldException, java.io.IOException, AutomationException
java.lang.NoSuchFieldException
java.io.IOException
AutomationException
protected com.linar.jintegra.Variant invoke(java.lang.String methodName, int dispId, long kind, com.linar.jintegra.Variant[] parameters) throws AutomationException, java.io.IOException
Invokes the method or gets/set a property identified by the dispId parameter. Whether it is a method or a property is specified using the kind parameter.
methodName
- the name of the method to be invoked. Purely used for logging purposes, the
method to be invoked is determined by the opNum parameter.dispId
- the ID of the method or property.kind
- one of DISPATCH_METHOD, DISPATCH_PROPERTYGET,
DISPATCH_PROPERTYPUT, or DISPATCH_PROPERTYPUTREF.parameters
- the parameters to the method, or the value to be set
AutomationException
java.io.IOException
public void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource) throws java.io.IOException
iidStr
- the ID of the outgoing interface, implemented by the listenertheListener
- the object to be informed of the eventstheSource
- the proxy class that represents the COM class that is the source of the events
java.io.IOException
public long cookieForListener(java.lang.Object theListener)
theListener
- the listener whose cookie should be returned
public void removeListener(java.lang.String iidStr, java.lang.Object theListener) throws java.io.IOException
iidStr
- the ID of the outgoing interface, implemented by the listenertheListener
- the object that no longer wishes to be informed of the events
java.io.IOException
protected int getDispatchIdOfName(java.lang.String name) throws java.lang.NoSuchFieldException, AutomationException, java.io.IOException
name
- the name of the method or property
java.lang.NoSuchFieldException
- if the method or field does not exist
AutomationException
java.io.IOException
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static java.lang.String createObjrefMonikerDisplayName(java.lang.Object forObject) throws java.io.IOException
java.io.IOException
public void convertToNative() throws java.io.IOException
java.io.IOException
public static java.lang.Object getActiveObject(java.lang.String clsid) throws java.io.IOException
java.io.IOException
public static java.lang.Object getActiveObject(java.lang.String clsid, java.lang.String iid) throws java.io.IOException
java.io.IOException
public static java.lang.Object bindUsingMoniker(java.lang.String moniker) throws java.io.IOException
java.io.IOException
public static int getLastErrorCode()
public void vtblInvoke(java.lang.String methodName, int opNum, java.lang.Object[] paramValues) throws java.io.IOException, AutomationException
java.io.IOException
AutomationException
public static java.lang.Object getMtsObjectContext()
public java.lang.Object getPropertyByName(java.lang.String name) throws java.lang.NoSuchFieldException, java.io.IOException, AutomationException
name
- The name of the property to get.
java.lang.NoSuchFieldException
- If the property does not exit.
java.io.IOException
- If there are communications problems.
AutomationException
- If the remote server throws an exception.public java.lang.Object getPropertyByName(java.lang.String name, java.lang.Object rhs) throws java.lang.NoSuchFieldException, java.io.IOException, AutomationException
java.lang.NoSuchFieldException
java.io.IOException
AutomationException
public void setPropertyByName(java.lang.String name, java.lang.Object value) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public java.lang.Object invokeMethodByName(java.lang.String name, java.lang.Object[] parameters) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public java.lang.Object invokeMethodByName(java.lang.String name, com.linar.jintegra.Variant[] parameters) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public java.lang.Object invokePropertyGetByName(java.lang.String name, com.linar.jintegra.Variant[] parameters) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public void invokePropertyPutByName(java.lang.String name, com.linar.jintegra.Variant[] parameters) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public void invokePropertyPutByRefByName(java.lang.String name, com.linar.jintegra.Variant[] parameters) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
public java.lang.Object invokeMethodByName(java.lang.String name, java.lang.Object[] parameters, boolean[] byRefMask) throws java.lang.NoSuchMethodException, java.io.IOException, AutomationException
java.lang.NoSuchMethodException
java.io.IOException
AutomationException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |