May 2001
Intermediate to advanced
1088 pages
30h 13m
English
RMI makes it easy to integrate SSL. RMI has two special interfaces—RMIClientSocketFactory and RMIServerSocketFactory—that allow you to substitute your own socket implementations for the sockets and RMI usually uses. All you need to do is create your own implementation of these interfaces to return SSL sockets and you have encrypted RMI.
Listing 35.9 shows an implementation of both of the RMI socket factory interfaces.
package usingj2ee.ssl;import javax.net.ssl.*;import java.rmi.server.*;import java.io.*;import java.net.*;public class RMISSLSocketFactory implements RMIServerSocketFactory, RMIClientSocketFactory, Serializable { public ServerSocket createServerSocket(int ... |
Read now
Unlock full access