public class DDEServer extends Object implements Runnable, DdeInterface
This class interacts between server object calls and the native C++ DDE server (NPDDE and DDESRV DLLs).
This class starts a thread that is the owner of the native DDE window procedure, see constructor and run method.
This class also implements the DdeInterface interface that is accessible from the client classes.
The client loads this class dynamically and set a callback object through the setOwner method. Then new messages are sent from the client through the serverTransaction method. The DDECallServer class passes the message to the message thread and returns. When the message is processed, the DDECallServer message thread will send a reply to the owner (to the server).
If the native DLL want to send a callback message to the server, it is sent through the sendMessage method. This method takes a DDEEvent object as parameter and will use that to send an event to the server. Then is waits (through Object.wait() method) for a reply (through the DdeInterface's serverReply method).
Constructor and Description |
---|
DDEServer() |
Modifier and Type | Method and Description |
---|---|
protected int |
DDEServerWinProc(DDEEvent event,
String serverName)
Native function for the DDE window procedure that
handles DDE messages from other applications and
the DDESRV.DLL.
|
void |
finalize()
Stop all threads and (?) unload the DLL.
|
void |
initiate(SessionManager sessionManager,
String serverName)
Start a new thread that dispatches the native WinProc for DDE.
|
static boolean |
printWindow(Component c)
Prints a window from the physical location on the screen.
|
protected static int |
printWindow1(Component c,
int xWindow,
int yWindow,
int x,
int y,
int cx,
int cy)
The print window from point.
|
void |
run()
Native WinProc thread.
|
int |
sendMessage(DDEEvent event)
This is the callback method for NPDDE.
|
void |
serverReply(String retString)
Reply from the Server - Java/REXX object.
|
int |
serverTransaction(Transaction trans)
New command from server (REXX/Java object).
|
void |
setWindowReady(int hwndDDE)
If windowproc not ready, set it ready.
|
protected int DDEServerWinProc(DDEEvent event, String serverName)
protected static int printWindow1(Component c, int xWindow, int yWindow, int x, int y, int cx, int cy)
public static boolean printWindow(Component c)
public void initiate(SessionManager sessionManager, String serverName)
initiate
in interface DdeInterface
public int serverTransaction(Transaction trans)
serverTransaction
in interface DdeInterface
public void serverReply(String retString)
serverReply
in interface DdeInterface
public int sendMessage(DDEEvent event)
public void setWindowReady(int hwndDDE)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.