public class Inspector
extends java.lang.Object
InterProcessComm
implementation for communication with any client.
To use the Inspector in Java you should insert the following lines on start of an Java program:
class MyTestClass { void startRoutine() { //Instantiate the InterprocessComm implementation for sockets new org.vishia.communication.InterProcessCommFactorySocket(); //Instance for Inspector service: Inspector inspc = new Inspector("UDP:0.0.0.0:60094"); inspc.start(this); } void terminateRoutine() { Inspector.get().shutdown(this); } ......
InterProcessComm_SocketImpl
instantiates a singleton referred with InterProcessCommFactory.getInstance()
for socket communication. This is recommended on PC platforms.
start(Object)
routine initiates the Inspector service with the given instance as root instance.
shutdown()
is necessary especially if a Java frame still runs but the application with the Inspector should be terminate.
It closes the communication, close the socket. If the whole Java application is end as process on the operation system, the communication is closed from the system already.
Modifier and Type | Field and Description |
---|---|
ClassContent |
classContent
The sub module ClassContent should be accessible from outside to offer methods of it in the application itself.
|
private CmdExecuter |
cmdExecuter
The main cmd executer.
|
private Comm |
comm
The communication class.
|
private static Inspector |
singleton |
static java.lang.String |
version
Version and history
2015-08-05 Hartmut new
get() to get the first instance which may be a singleton. |
Constructor and Description |
---|
Inspector(java.lang.String commOwnAddr) |
Modifier and Type | Method and Description |
---|---|
static Inspector |
get()
Returns the first instance of the Inspector in this application.
|
void |
shutdown()
Shutdown the communication, close the thread.
|
void |
start(ClassJc rootClazz,
MemSegmJc rootAddr)
Start the execution.
|
void |
start(java.lang.Object rootObj)
Start the execution.
|
public static final java.lang.String version
get()
to get the first instance which may be a singleton.
classContent
is public to access its methods.
shutdown()
to end communication thread.
private static Inspector singleton
public final ClassContent classContent
private final CmdExecuter cmdExecuter
CmdConsumer_ifc
private final Comm comm
public Inspector(java.lang.String commOwnAddr)
commOwnAddr
- forex "UDP:0.0.0.0:60078"public static Inspector get()
public void start(java.lang.Object rootObj)
public void start(ClassJc rootClazz, MemSegmJc rootAddr)
public void shutdown()
start(Object)
.