NonStop Server for Java 7.0 Programmer's Reference
server class (JISVC is an assumed server class name), whereas the client is configured to act as a
Pathsend client. The configuration details are explained in the section “Mapping file” (page 76).
DescriptionCallsSequence
The server starts listening on $RECEIVE for any new
connections. For more information on connections,
see “Establishing a connection” (page 79).
ssock.accept();
This call is initiated on the server side.
(1)
This call internally results in establishing a connection
to the server class JISVC using the Pathsend dialog
new Socket(“nonstop.server.com”,8070);
This call is initiated on the client side.
(2)
API. This happens because as per JI configuration,
the client needs to act as a Pathsend client.
This call internally results data being sent to the server
using Pathsend dialog API. This happens because
os.write();
This call is initiated on the client side.
(3)
as per JI configuration, the client needs to act as a
Pathsend client.
This call results in data being read from $RECEIVE
on the connection that is established.
is.read();
This call is initiated on the server side.
(4)
This results in the reply being sent to the client.os.write();
This call is initiated on the server side.
(5)
This results in the reply data being read.is.read();
This call is initiated on the client side.
(6)
Architecture
This section explains how the socket related classes in java.net package and the channel related
classes in java.nio.channel package demonstrate NonStop IPC behavior.
NOTE: In the subsequent sections:
• Reference to socket includes an NIO socket channel and any reference to server socket includes
an NIO server socket channel.
• Assume that JI is enabled. For more information on enabling JI, see “Enabling JI” (page 75).
Socket or ServerSocket in java.net package
NSJ defines an abstract class java.net.SocketImpl, which is a common superclass of all
classes that implement sockets. Concrete implementation of this class is used to create both client
and server sockets. While NSJ provides implementation of this class to create TCP sockets, JI
provides an implementation (JISocketImpl) to create NonStop IPC sockets. Based on the
mapping file, NSJ decides if a Socket has to be plain TCP or a NonStop IPC socket. For more
information on mapping file, see “Mapping file” (page 76). In case of a NonStop IPC socket, NSJ
creates the socket with JISocketImpl as the class implementing java.net.SocketImpl.
Figure 4 (page 74) illustrates the creation of socket object.
Architecture 73










