NonStop Server for Java 7.0 Programmer's Reference
Figure 4 Creating a java.net.socket
Application Start
Application creates a client/server socket
new Socket(“nonstop.server.com”,8070);
Make JISocketlmpl as
Socketlmpl for the socket
Allow TCP socket creation
No
Yes
JI library checks if there is
an entry in JI mapping file for
the socket address?
SelectableChannels in java.nio.channelspackage
NSJ defines a service provider interface (spi) package (java.nio.channels.spi) in NIO. This
package defines an abstract class SelectorProvider. A concrete implementation of this class
is used by the JVM to obtain instances of SelectableChannels and Selector. JI provides a
SelectorProvider implementation, that extends the default SelectorProvider implementation
of NSJ and overrides the methods openSelector(), openServerSocketChannel(), and
openSocketChannel(). These methods return JI implementation of
java.nio.channels.Selector, java.nio.channels.ServerSocketChannel, and
java.nio.channels.SocketChannel. However, the JI implementation classes have the ability
to exhibit normal TCP behavior and NonStop IPC behavior.
NOTE: A given instance of a channel can either exhibit TCP behavior or NonStop IPC behavior.
Figure 5 (page 75) shows the flow in creating a java.nio.SocketChannel.
74 Java infrastructure










