|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jniwrapper.win32.MessageLoopThread
com.jniwrapper.win32.automation.OleMessageLoop
This class provides the dedicated message queue thread for OLE/COM.
Field Summary |
Fields inherited from class com.jniwrapper.win32.MessageLoopThread |
_log |
Constructor Summary | |
OleMessageLoop()
Creates message loop instance. |
|
OleMessageLoop(boolean daemon)
Creates a message loop instance. |
|
OleMessageLoop(java.lang.String name)
Creates message loop instance. |
Method Summary | |
static void |
addAction(java.lang.Runnable action)
Adds a runnable action that will be executed in the message thread. |
static void |
addAction(java.lang.Runnable action,
boolean postWorkerAvailableMessage)
Adds the runnable action to be executed within the message thread. |
static void |
addMessageListener(MessageLoopListener listener)
Adds the new process messages listener to receive events from the message loop. |
IUnknown |
bindObject(IUnknown unknown)
Binds the specified object to the thread. |
static OleMessageLoop |
get(java.lang.Thread thread)
|
static OleMessageLoop |
getInstance()
Returns main application message loop. |
static void |
invokeAndWait(java.lang.Runnable action)
Invokes the specified action in the message loop thread and waits for its termination |
static void |
invokeLater(java.lang.Runnable action)
Adds a runnable action that will be executed in the message thread. |
static java.lang.Object |
invokeMethod(java.lang.Object object,
java.lang.String methodName)
Invokes a method of calling an object in the message thread. |
static java.lang.Object |
invokeMethod(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] parameters)
Invokes a method of calling object in message thread. |
protected void |
onStart()
|
protected void |
onStop()
|
static void |
postThreadMessage(int message)
Posts the message to the message queue of the message loop thread. |
static void |
postThreadMessage(int message,
int wParam,
int lParam)
Deprecated. This method is incompatible with 64-bit architectures. Use postThreadMessage(int message, long wParam, long lParam) instead. |
static void |
postThreadMessage(int message,
long wParam,
long lParam)
Posts the specified message to the message queue of the message loop thread. |
static void |
removeMessageListener(MessageLoopListener listener)
Removes the specified process message listener. |
static void |
start()
Starts the message loop thread. |
static void |
stop()
Terminates the message thread. |
Methods inherited from class com.jniwrapper.win32.MessageLoopThread |
doAddMessageListener, doInvokeAndWait, doInvokeLater, doInvokeMethod, doInvokeMethod, doRemoveMessageListener, doStart, doStop, getMessageLoops, getName, isDispatchThread, isStarted, pingMessageLoopThread, postSyncThreadMessage, postSyncThreadMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OleMessageLoop()
public OleMessageLoop(java.lang.String name)
public OleMessageLoop(boolean daemon)
daemon
- determines if the message loop thread is a daemon thread or not.Method Detail |
public static OleMessageLoop get(java.lang.Thread thread)
public static OleMessageLoop getInstance()
public static void addMessageListener(MessageLoopListener listener)
listener
- the process message listener.public static void removeMessageListener(MessageLoopListener listener)
listener
- the process message listener.public static void start()
public static void postThreadMessage(int message)
message
- the type of message to be posted.public static void postThreadMessage(int message, int wParam, int lParam)
postThreadMessage(int message, long wParam, long lParam)
instead.
message
- the type of message to be posted.wParam
- additional message-specific information.lParam
- additional message-specific information.public static void postThreadMessage(int message, long wParam, long lParam)
message
- the type of message to be posted.wParam
- additional message-specific information.lParam
- additional message-specific information.public static void addAction(java.lang.Runnable action, boolean postWorkerAvailableMessage)
action
- the action to run within message loop.postWorkerAvailableMessage
- if true - posts the Msg.WM_USER
message to avake the thread.public static void addAction(java.lang.Runnable action)
action
- is an action to be executed within the thread.public static void invokeLater(java.lang.Runnable action)
action
- is an action to be executed within the thread.public static void invokeAndWait(java.lang.Runnable action) throws java.lang.InterruptedException, java.lang.reflect.InvocationTargetException
action
- action to execute.
java.lang.InterruptedException
java.lang.reflect.InvocationTargetException
public static java.lang.Object invokeMethod(java.lang.Object object, java.lang.String methodName) throws java.lang.InterruptedException, java.lang.reflect.InvocationTargetException
object
- is a caller whose method is to be executed.methodName
- is a method name to execute.
java.lang.InterruptedException
java.lang.reflect.InvocationTargetException
public static java.lang.Object invokeMethod(java.lang.Object object, java.lang.String methodName, java.lang.Object[] parameters) throws java.lang.InterruptedException, java.lang.reflect.InvocationTargetException
object
- is a caller whose method is to be executed.methodName
- is a method name to execute.parameters
- are method parameters; can be null if there are no
parameters.
java.lang.InterruptedException
java.lang.reflect.InvocationTargetException
public static void stop()
protected void onStart()
protected void onStop()
public IUnknown bindObject(IUnknown unknown)
unknown
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |