|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object chrriis.dj.nativeswing.swtimpl.NativeInterface
public abstract class NativeInterface
The native interface, which establishes the link between the peer VM (native side) and the local side.
Constructor Summary | |
---|---|
NativeInterface()
|
Method Summary | |
---|---|
static void |
addNativeInterfaceListener(NativeInterfaceListener listener)
Add a native interface listener. |
static void |
close()
Close the native interface, which destroys the native side (peer VM). |
protected static void |
computeMessageID(Message message,
boolean isTargetNativeSide)
|
protected static NativeInterfaceConfiguration |
createConfiguration()
|
static NativeInterfaceConfiguration |
getConfiguration()
Get the configuration, which allows to modify some parameters. |
protected static NativeInterface |
getInstance()
|
protected static int |
getMessageID(Message message)
|
protected static Class<?>[] |
getNativeClassPathReferenceClasses(NativeInterfaceConfiguration nativeInterfaceConfiguration)
|
protected static String[] |
getNativeClassPathReferenceResources(NativeInterfaceConfiguration nativeInterfaceConfiguration)
|
static NativeInterfaceListener[] |
getNativeInterfaceListeners()
Get all the native interface listeners. |
protected static String[] |
getPeerVMParams(NativeInterfaceConfiguration nativeInterfaceConfiguration)
|
static void |
initialize()
Initialize the native interface, but do not open it. |
static boolean |
isEventPumpRunning()
Indicate if events are being pumped (by a call to runEventPump). |
static boolean |
isInitialized()
Indicate whether the native interface is initialized. |
static boolean |
isInProcess()
|
protected static boolean |
isMessageSyncExec(Message message)
|
protected static boolean |
isMessageUI(Message message)
|
protected static boolean |
isMessageValid(Message message)
|
static boolean |
isOpen()
Indicate whether the native interface is open. |
static boolean |
isUIThread(boolean isNativeSide)
Indicate if the current thread is the user interface thread. |
static void |
main(String[] args)
The main method that is called by the native side (peer VM). |
static void |
open()
Open the native interface, which creates the peer VM that handles the native side of the native integration. |
static void |
printStackTraces()
Print the stack traces to system err, including the ones from the peer VM when applicable. |
static void |
printStackTraces(PrintStream printStream)
Print the stack traces to a print stream, including the ones from the peer VM when applicable. |
static void |
printStackTraces(PrintWriter printWriter)
Print the stack traces to a print writer, including the ones from the peer VM when applicable. |
static void |
removeNativeInterfaceListener(NativeInterfaceListener listener)
Remove a native interface listener. |
static void |
runEventPump()
Run the native event pump. |
protected static Object |
runMessageCommand(CommandMessage commandMessage)
|
protected static Object |
runMessageCommand(LocalMessage commandMessage)
|
protected static void |
setMessageArgs(CommandMessage message,
Object... args)
|
protected static void |
setMessageSyncExec(Message message,
boolean isSyncExec)
|
protected static void |
setMessageUI(Message message,
boolean isUI)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NativeInterface()
Method Detail |
---|
protected static NativeInterface getInstance()
public static boolean isOpen()
public static void close()
public static NativeInterfaceConfiguration getConfiguration()
public static boolean isInitialized()
public static boolean isInProcess()
public static void initialize()
public static void printStackTraces()
public static void printStackTraces(PrintStream printStream)
public static void printStackTraces(PrintWriter printWriter)
public static void open()
public static boolean isUIThread(boolean isNativeSide)
IllegalStateException
- when the native interface is not alive.public static void runEventPump()
public static boolean isEventPumpRunning()
public static void addNativeInterfaceListener(NativeInterfaceListener listener)
listener
- the native listener to add.public static void removeNativeInterfaceListener(NativeInterfaceListener listener)
listener
- the native listener to remove.public static NativeInterfaceListener[] getNativeInterfaceListeners()
protected static NativeInterfaceConfiguration createConfiguration()
protected static Object runMessageCommand(LocalMessage commandMessage)
protected static Object runMessageCommand(CommandMessage commandMessage) throws Exception
Exception
protected static boolean isMessageSyncExec(Message message)
protected static void setMessageSyncExec(Message message, boolean isSyncExec)
protected static String[] getPeerVMParams(NativeInterfaceConfiguration nativeInterfaceConfiguration)
protected static Class<?>[] getNativeClassPathReferenceClasses(NativeInterfaceConfiguration nativeInterfaceConfiguration)
protected static String[] getNativeClassPathReferenceResources(NativeInterfaceConfiguration nativeInterfaceConfiguration)
protected static int getMessageID(Message message)
protected static boolean isMessageValid(Message message)
protected static void setMessageArgs(CommandMessage message, Object... args)
protected static void computeMessageID(Message message, boolean isTargetNativeSide)
protected static void setMessageUI(Message message, boolean isUI)
protected static boolean isMessageUI(Message message)
public static void main(String[] args) throws Exception
args
- the arguments that are passed to the peer VM.
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |