コード例 #1
0
ファイル: SocketFactory.java プロジェクト: gdethier/dimawo
 public void close() {
   if (host != null) host.close();
 }
コード例 #2
0
ファイル: SocketFactory.java プロジェクト: gdethier/dimawo
 public SocketInterface newSocket() throws IOException {
   if (host != null) return host.newSocket();
   else return new RealSocket();
 }
コード例 #3
0
ファイル: SocketFactory.java プロジェクト: gdethier/dimawo
 public ServerSocketInterface newServerSocket(int port) throws IOException {
   if (host != null) return host.newServerSocket(port);
   else return new RealServerSocket(port);
 }
コード例 #4
0
ファイル: SocketFactory.java プロジェクト: gdethier/dimawo
 public String getHostName() throws UnknownHostException {
   if (host != null) return host.getHostName();
   else return InetAddress.getLocalHost().getHostName();
 }