1 23 24 31 package com.sun.enterprise.admin.server.core.channel; 32 33 import java.io.IOException ; 34 import java.io.Serializable ; 35 import java.net.InetAddress ; 36 import java.net.ServerSocket ; 37 import java.net.UnknownHostException ; 38 import java.rmi.server.RMIServerSocketFactory ; 39 40 44 public class LocalRMIServerSocketFactory implements RMIServerSocketFactory { 45 46 private InetAddress localLoopbackAddress; 47 48 55 public LocalRMIServerSocketFactory() throws UnknownHostException { 56 localLoopbackAddress = InetAddress.getByName(null); 57 } 58 59 66 public LocalRMIServerSocketFactory(InetAddress localAddr) { 67 localLoopbackAddress = localAddr; 68 } 69 70 78 public ServerSocket createServerSocket(int port) throws IOException { 79 return new ServerSocket (port, 0, localLoopbackAddress); 80 } 81 } 82 | Popular Tags |