sunlabs.brazil.servlet
Class BServletServerSocket

java.lang.Object
  extended by java.net.ServerSocket
      extended by sunlabs.brazil.servlet.BServletServerSocket (view source)

public class BServletServerSocket
extends ServerSocket

This is a special ServerSocket intended for use by the Brazil Servlet Adapter. It provides dummy methods for the ServerSocket operations used by the Brazil Toolkit. Do not use this class for anything other than it's intended use as a ServerSocket object that is passed to the constructor of a Server object by the BrazilServlet's init method.

See Also:
ServerSocket, BServletServerSocket, Server, BrazilServlet, BServletRequest

Constructor Summary
BServletServerSocket()
          Creates a BServletServerSocket object using -1 as a port number.
BServletServerSocket(int port)
          Creates a BServletServerSocket object.
 
Method Summary
 Socket accept()
          Dummy method, not implemented.
 void close()
          Closes this socket.
 InetAddress getInetAddress()
          Returns the local address to which this socket is bound.
 int getLocalPort()
          Returns the local port to which this socket is bound.
 int getSoTimeout()
          Dummy method, not implemented.
 void setLocalPort(int port)
          Sets the local port to which this socket is bound.
static void setSocketFactory(SocketImplFactory fac)
          Dummy method, not implemented.
 void setSoTimeout(int timeout)
          Dummy method, not implemented.
 String toString()
          Converts this socket to a String.
 
Methods inherited from class java.net.ServerSocket
bind, bind, getChannel, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BServletServerSocket

public BServletServerSocket()
                     throws IOException
Creates a BServletServerSocket object using -1 as a port number.

Throws:
IOException

BServletServerSocket

public BServletServerSocket(int port)
                     throws IOException
Creates a BServletServerSocket object.

Parameters:
port - the port number this object encapsulates.
Throws:
IOException
See Also:
setLocalPort(int port)
Method Detail

getInetAddress

public InetAddress getInetAddress()
Returns the local address to which this socket is bound.

Overrides:
getInetAddress in class ServerSocket
Returns:
the local address number to which this socket is bound.

setLocalPort

public void setLocalPort(int port)
Sets the local port to which this socket is bound. Not a method in ServerSocket because the port is fixed at construction time. It's needed here because a Servlet doesn't know it's local port until it services it's first request.


getLocalPort

public int getLocalPort()
Returns the local port to which this socket is bound.

Overrides:
getLocalPort in class ServerSocket
Returns:
the local port number to which this socket is bound.

accept

public Socket accept()
              throws IOException
Dummy method, not implemented.

Overrides:
accept in class ServerSocket
Returns:
null
Throws:
IOException - if method called.

close

public void close()
           throws IOException
Closes this socket.

Overrides:
close in class ServerSocket
Throws:
IOException - if an I/O error occurs when closing this socket.

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Dummy method, not implemented.

Overrides:
setSoTimeout in class ServerSocket
Parameters:
timeout - doesn't do anything.
Throws:
SocketException - if method called.

getSoTimeout

public int getSoTimeout()
                 throws IOException
Dummy method, not implemented.

Overrides:
getSoTimeout in class ServerSocket
Returns:
-1
Throws:
IOException - if method called.

toString

public String toString()
Converts this socket to a String.

Overrides:
toString in class ServerSocket
Returns:
a string representation of this socket.

setSocketFactory

public static void setSocketFactory(SocketImplFactory fac)
                             throws IOException
Dummy method, not implemented.

Parameters:
fac - doesn't do anything.
Throws:
IOException - if method called.

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.