1 package org.sapia.ubik.net.mplex; 2 3 import java.io.IOException ; 4 5 import java.net.InetAddress ; 6 import java.net.ServerSocket ; 7 import java.net.Socket ; 8 import java.net.SocketAddress ; 9 import java.net.SocketException ; 10 11 12 42 public class ServerSocketAdapter extends ServerSocket { 43 44 private MultiplexSocketConnector _theDelegate; 45 46 49 public ServerSocketAdapter(MultiplexSocketConnector anInterceptor) 50 throws IOException { 51 super(); 52 _theDelegate = anInterceptor; 53 } 54 55 58 public void bind(SocketAddress endpoint) throws IOException { 59 throw new UnsupportedOperationException (); 60 } 61 62 65 public void bind(SocketAddress endpoint, int backlog) 66 throws IOException { 67 throw new UnsupportedOperationException (); 68 } 69 70 73 public InetAddress getInetAddress() { 74 return _theDelegate.getInetAddress(); 75 } 76 77 80 public int getLocalPort() { 81 return _theDelegate.getLocalPort(); 82 } 83 84 87 public SocketAddress getLocalSocketAddress() { 88 return _theDelegate.getLocalSocketAddress(); 89 } 90 91 94 public Socket accept() throws IOException { 95 return _theDelegate.accept(); 96 } 97 98 101 public void close() throws IOException { 102 _theDelegate.close(); 103 } 104 105 108 public boolean isBound() { 109 return _theDelegate.isBound(); 110 } 111 112 115 public boolean isClosed() { 116 return _theDelegate.isClosed(); 117 } 118 119 122 public void setSoTimeout(int timeout) throws SocketException { 123 throw new UnsupportedOperationException (); 124 } 125 126 129 public int getSoTimeout() throws IOException { 130 return _theDelegate.getSoTimeout(); 131 } 132 133 136 public void setReuseAddress(boolean on) throws SocketException { 137 throw new UnsupportedOperationException (); 138 } 139 140 143 public boolean getReuseAddress() throws SocketException { 144 return _theDelegate.getReuseAddress(); 145 } 146 147 150 public void setReceiveBufferSize(int size) throws SocketException { 151 throw new UnsupportedOperationException (); 152 } 153 154 157 public int getReceiveBufferSize() throws SocketException { 158 return _theDelegate.getReceiveBufferSize(); 159 } 160 } 161 | Popular Tags |