net.sf.asyncobjects.net
Interface AServerSocket

All Superinterfaces:
ACloseable, AsyncObject
All Known Implementing Classes:
NIOServerSocket, TServerSocket

public interface AServerSocket
extends ACloseable

A wrapper for server socket

Author:
const

Method Summary
 Promise<ASocket> accept()
          Accept incomming connection
 Promise<Void> bind(int port)
          Bind to specified port
 Promise<Void> bind(String host, int port, int backlog)
          Bind to specified port an host
 
Methods inherited from interface net.sf.asyncobjects.ACloseable
close
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Method Detail

bind

Promise<Void> bind(int port)
Bind to specified port

Parameters:
port - a port to use
Returns:
when operation finishes
See Also:
ServerSocket.bind(java.net.SocketAddress)

bind

Promise<Void> bind(String host,
                   int port,
                   int backlog)
Bind to specified port an host

Parameters:
host - a host to bind to
port - a port to use
backlog - a backlog of socket
Returns:
when operation finishes
See Also:
ServerSocket.bind(java.net.SocketAddress, int)

accept

Promise<ASocket> accept()
Accept incomming connection

Returns:
a socket when connection is received
See Also:
ServerSocket.accept()


Copyright 2002-2007 Constantine Plotnikov. All Rights Reserved.