com.jniwrapper.win32.automation
Class ScriptingAutomation

java.lang.Object
  extended bycom.jniwrapper.win32.automation.ScriptingAutomation

public class ScriptingAutomation
extends java.lang.Object

Provides functions to invoke property setters and getters using features of IDispatchEx interface. By default it uses OleMessageLoop thread to perform automation in it. If you need to perform automation in the current thread, use an appropriate constructor.


Nested Class Summary
 class ScriptingAutomation.InvocationHelper
           
 
Constructor Summary
ScriptingAutomation(IUnknown unknown)
           
ScriptingAutomation(IUnknown unknown, boolean useCurrentThread)
           
 
Method Summary
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns property value of a referenced interface.
 boolean isUseCurrentThread()
          Returns true if the automation is performed in the current thread; false - if in the OleMessageLoop thread.
 void release()
           
 void setProperty(java.lang.String propertyName, java.lang.Object value)
          Sets property value of a referenced interface.
 void setProperty(java.lang.String propertyName, Variant value)
          Sets property value of a referenced interface.
 void setUseCurrentThread(boolean useCurrentThread)
          Specifies where to perform automation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptingAutomation

public ScriptingAutomation(IUnknown unknown,
                           boolean useCurrentThread)

ScriptingAutomation

public ScriptingAutomation(IUnknown unknown)
Method Detail

isUseCurrentThread

public boolean isUseCurrentThread()
Returns true if the automation is performed in the current thread; false - if in the OleMessageLoop thread.

Returns:
true if the automation is performed in the current thread; false - if in the OleMessageLoop thread.

setUseCurrentThread

public void setUseCurrentThread(boolean useCurrentThread)
Specifies where to perform automation.

Parameters:
useCurrentThread - if true, the current thread will be used; if false - OleMessageLoop thread.

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
                             throws ComException
Returns property value of a referenced interface.

Parameters:
propertyName - object's property name.
Returns:
property value.
Throws:
ComException

setProperty

public void setProperty(java.lang.String propertyName,
                        Variant value)
                 throws ComException
Sets property value of a referenced interface.

Parameters:
propertyName - object's property name.
value - a new property value.
Throws:
ComException

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value)
                 throws ComException
Sets property value of a referenced interface.

Parameters:
propertyName - object's property name.
value -
Throws:
ComException

release

public void release()