COM.claymoresystems.ptls
Class SSLServerSocket

java.lang.Object
  extended by java.net.ServerSocket
      extended by COM.claymoresystems.ptls.SSLServerSocket

public class SSLServerSocket
extends java.net.ServerSocket


Constructor Summary
SSLServerSocket(SSLContext ctx, int port)
          Create an SSLServerSocket specifying the port and backlog
SSLServerSocket(SSLContext ctx, java.lang.Integer port, java.lang.Integer backlog, java.net.InetAddress inetaddr)
          Create an SSLServerSocket specifying the port, backlog, and listen address.
SSLServerSocket(SSLContext ctx, int port, int backlog)
          Create an SSLServerSocket specifying the port only
SSLServerSocket(SSLContext ctx, int port, int backlog, java.net.InetAddress inetaddr)
          Create an SSLServerSocket specifying the port, backlog, and listen address
 
Method Summary
 java.net.Socket accept()
          Accept a connection on this socket, and perform the SSL server handshake in the process
static void main(java.lang.String[] args)
          Internal test code
 
Methods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSLServerSocket

public SSLServerSocket(SSLContext ctx,
                       java.lang.Integer port,
                       java.lang.Integer backlog,
                       java.net.InetAddress inetaddr)
                throws java.io.IOException
Create an SSLServerSocket specifying the port, backlog, and listen address. We need this to support the CSJ interface, which is why it duplicates the "int" version

Parameters:
ctx - the SSLContext to use to create this socket
port - the port to listen on
backlog - the number of connections to queue up
inetaddr - the address to listen on, assuming a multihomes machine. A null value listens on all interfaces
Throws:
java.io.IOException - if something goes wrong creating the socket

SSLServerSocket

public SSLServerSocket(SSLContext ctx,
                       int port,
                       int backlog,
                       java.net.InetAddress inetaddr)
                throws java.io.IOException
Create an SSLServerSocket specifying the port, backlog, and listen address

Parameters:
ctx - the SSLContext to use to create this socket
port - the port to listen on
backlog - the number of connections to queue up
inetaddr - the address to listen on, assuming a multihomes machine. A null value listens on all interfaces
Throws:
java.io.IOException - if something goes wrong creating the socket

SSLServerSocket

public SSLServerSocket(SSLContext ctx,
                       int port)
                throws java.io.IOException
Create an SSLServerSocket specifying the port and backlog

Parameters:
ctx - the SSLContext to use to create this socket
port - the port to listen on
Throws:
java.io.IOException - if something goes wrong creating the socket

SSLServerSocket

public SSLServerSocket(SSLContext ctx,
                       int port,
                       int backlog)
                throws java.io.IOException
Create an SSLServerSocket specifying the port only

Parameters:
ctx - the SSLContext to use to create this socket
port - the port to listen on
backlog - the number of connections to queue up
Throws:
java.io.IOException - if something goes wrong creating the socket
Method Detail

accept

public java.net.Socket accept()
                       throws java.io.IOException
Accept a connection on this socket, and perform the SSL server handshake in the process

Overrides:
accept in class java.net.ServerSocket
Returns:
an SSLSocket attached to the opposite end
Throws:
java.io.IOException - if an error occurs either during the accept or the handshake

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Internal test code

Throws:
java.io.IOException


Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.