org.xsocket.stream.io.spi
Interface IAcceptor

Package class diagram package IAcceptor
All Superinterfaces:
java.io.Closeable

public interface IAcceptor
extends java.io.Closeable

Acceptor specification

This class is experimental and is subject to change


Field Summary
static java.lang.String ACCEPTOR_CLASSNAME_KEY
           
static java.lang.String SO_RCVBUF
           
static java.lang.String SO_REUSEADDR
           
 
Method Summary
 java.net.InetSocketAddress getLocalAddress()
          returns the local socket address
 int getNumberOfOpenConnections()
          return the number of open connections
 java.lang.Object getOption(java.lang.String name)
          returns the value of a option
 java.util.Map<java.lang.String,java.lang.Class> getOptions()
          Returns an unmodifiable map of the options supported by this endpont.
 void listen()
          executes the acceptor by listening incoming connections.
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

ACCEPTOR_CLASSNAME_KEY

static final java.lang.String ACCEPTOR_CLASSNAME_KEY
See Also:
Constant Field Values

SO_RCVBUF

static final java.lang.String SO_RCVBUF
See Also:
Constant Field Values

SO_REUSEADDR

static final java.lang.String SO_REUSEADDR
See Also:
Constant Field Values
Method Detail

getOption

java.lang.Object getOption(java.lang.String name)
                           throws java.io.IOException
returns the value of a option

Parameters:
name - the name of the option
Returns:
the value of the option
Throws:
java.io.IOException - In an I/O error occurs

getOptions

java.util.Map<java.lang.String,java.lang.Class> getOptions()
Returns an unmodifiable map of the options supported by this endpont. The key in the returned map is the name of a option, and its value is the type of the option value. The returned map will never contain null keys or values.

Returns:
An unmodifiable map of the options supported by this channel

listen

void listen()
            throws java.io.IOException
executes the acceptor by listening incoming connections. This method blocks

Throws:
java.io.IOException - If some other I/O error occurs

getNumberOfOpenConnections

int getNumberOfOpenConnections()
return the number of open connections


getLocalAddress

java.net.InetSocketAddress getLocalAddress()
returns the local socket address

Returns:
the local socket address