NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.core.net
Class DefaultNetworkLayer

java.lang.Object
  extended bygov.nist.core.net.DefaultNetworkLayer
All Implemented Interfaces:
NetworkLayer

public class DefaultNetworkLayer
extends Object
implements NetworkLayer

default implementation which passes straight through to java platform

Since:
1.1
Version:
1.2
Author:
m.andrews

Field Summary
static DefaultNetworkLayer SINGLETON
          single default network layer; for flexibility, it may be better not to make it a singleton, but singleton seems to make sense currently.
 
Method Summary
 DatagramSocket createDatagramSocket()
          Constructs a datagram socket and binds it to any available port on the local host machine.
 DatagramSocket createDatagramSocket(int port, InetAddress laddr)
          Creates a datagram socket, bound to the specified local address.
 ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress)
          Creates a server with the specified port, listen backlog, and local IP address to bind to.
 Socket createSocket(InetAddress address, int port)
          Creates a stream socket and connects it to the specified port number at the specified IP address.
 Socket createSocket(InetAddress address, int port, InetAddress myAddress)
          Creates a stream socket and connects it to the specified port number at the specified IP address.
 SSLServerSocket createSSLServerSocket(int port, int backlog, InetAddress bindAddress)
          Creates an SSL server with the specified port, listen backlog, and local IP address to bind to.
 SSLSocket createSSLSocket(InetAddress address, int port)
          Creates a stream SSL socket and connects it to the specified port number at the specified IP address.
 SSLSocket createSSLSocket(InetAddress address, int port, InetAddress myAddress)
          Creates a stream SSL socket and connects it to the specified port number at the specified IP address.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

public static final DefaultNetworkLayer SINGLETON
single default network layer; for flexibility, it may be better not to make it a singleton, but singleton seems to make sense currently.

Method Detail

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog,
                                       InetAddress bindAddress)
                                throws IOException
Description copied from interface: NetworkLayer
Creates a server with the specified port, listen backlog, and local IP address to bind to. comparable to "new java.net.ServerSocket(port,backlog,bindAddress);"

Specified by:
createServerSocket in interface NetworkLayer
Parameters:
port -
backlog -
bindAddress -
Returns:
the server socket
Throws:
IOException

createSocket

public Socket createSocket(InetAddress address,
                           int port)
                    throws IOException
Description copied from interface: NetworkLayer
Creates a stream socket and connects it to the specified port number at the specified IP address. comparable to "new java.net.Socket(address, port);"

Specified by:
createSocket in interface NetworkLayer
Parameters:
address -
port -
Returns:
the socket
Throws:
IOException

createDatagramSocket

public DatagramSocket createDatagramSocket()
                                    throws SocketException
Description copied from interface: NetworkLayer
Constructs a datagram socket and binds it to any available port on the local host machine. comparable to "new java.net.DatagramSocket();"

Specified by:
createDatagramSocket in interface NetworkLayer
Returns:
the datagram socket
Throws:
SocketException

createDatagramSocket

public DatagramSocket createDatagramSocket(int port,
                                           InetAddress laddr)
                                    throws SocketException
Description copied from interface: NetworkLayer
Creates a datagram socket, bound to the specified local address. comparable to "new java.net.DatagramSocket(port,laddr);"

Specified by:
createDatagramSocket in interface NetworkLayer
Parameters:
port -
laddr -
Returns:
the datagram socket
Throws:
SocketException

createSSLServerSocket

public SSLServerSocket createSSLServerSocket(int port,
                                             int backlog,
                                             InetAddress bindAddress)
                                      throws IOException
Description copied from interface: NetworkLayer
Creates an SSL server with the specified port, listen backlog, and local IP address to bind to. Added by Daniel J. Martinez Manzano

Specified by:
createSSLServerSocket in interface NetworkLayer
Parameters:
port -
backlog -
bindAddress -
Returns:
the server socket
Throws:
IOException

createSSLSocket

public SSLSocket createSSLSocket(InetAddress address,
                                 int port)
                          throws IOException
Description copied from interface: NetworkLayer
Creates a stream SSL socket and connects it to the specified port number at the specified IP address. Added by Daniel J. Martinez Manzano

Specified by:
createSSLSocket in interface NetworkLayer
Parameters:
address -
port -
Returns:
the socket
Throws:
IOException

createSSLSocket

public SSLSocket createSSLSocket(InetAddress address,
                                 int port,
                                 InetAddress myAddress)
                          throws IOException
Description copied from interface: NetworkLayer
Creates a stream SSL socket and connects it to the specified port number at the specified IP address. Added by Daniel J. Martinez Manzano

Specified by:
createSSLSocket in interface NetworkLayer
Parameters:
address -
port -
myAddress - -- my address.
Returns:
the socket
Throws:
IOException

createSocket

public Socket createSocket(InetAddress address,
                           int port,
                           InetAddress myAddress)
                    throws IOException
Description copied from interface: NetworkLayer
Creates a stream socket and connects it to the specified port number at the specified IP address. comparable to "new java.net.Socket(address, port,localaddress);"

Specified by:
createSocket in interface NetworkLayer
Parameters:
address -
port -
myAddress -
Returns:
the socket
Throws:
IOException

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.