org.apache.mina.transport.socket
Interface SocketAcceptor

All Superinterfaces:
IoAcceptor, IoService
All Known Implementing Classes:
AprSocketAcceptor, NioSocketAcceptor

public interface SocketAcceptor
extends IoAcceptor

IoAcceptor for socket transport (TCP/IP). This class handles incoming TCP/IP based socket connections.

Version:
$Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (jeu, 26 jun 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Method Summary
 int getBacklog()
          Returns the size of the backlog.
 InetSocketAddress getDefaultLocalAddress()
          Returns the default local address to bind when no argument is specified in IoAcceptor.bind() method.
 InetSocketAddress getLocalAddress()
          Returns the local address which is bound currently.
 SocketSessionConfig getSessionConfig()
          Returns the default configuration of the new SocketSessions created by this acceptor service.
 boolean isReuseAddress()
           
 void setBacklog(int backlog)
          Sets the size of the backlog.
 void setDefaultLocalAddress(InetSocketAddress localAddress)
           
 void setReuseAddress(boolean reuseAddress)
           
 
Methods inherited from interface org.apache.mina.core.service.IoAcceptor
bind, bind, bind, bind, getDefaultLocalAddresses, getLocalAddresses, isCloseOnDeactivation, newSession, setCloseOnDeactivation, setDefaultLocalAddress, setDefaultLocalAddresses, setDefaultLocalAddresses, setDefaultLocalAddresses, unbind, unbind, unbind, unbind
 
Methods inherited from interface org.apache.mina.core.service.IoService
addListener, broadcast, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getIdleState, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, getTransportMetadata, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
 

Method Detail

getLocalAddress

InetSocketAddress getLocalAddress()
Description copied from interface: IoAcceptor
Returns the local address which is bound currently. If more than one address are bound, only one of them will be returned, but it's not necessarily the firstly bound address.

Specified by:
getLocalAddress in interface IoAcceptor

getDefaultLocalAddress

InetSocketAddress getDefaultLocalAddress()
Description copied from interface: IoAcceptor
Returns the default local address to bind when no argument is specified in IoAcceptor.bind() method. Please note that the default will not be used if any local address is specified. If more than one address are set, only one of them will be returned, but it's not necessarily the firstly specified address in IoAcceptor.setDefaultLocalAddresses(List).

Specified by:
getDefaultLocalAddress in interface IoAcceptor

setDefaultLocalAddress

void setDefaultLocalAddress(InetSocketAddress localAddress)

isReuseAddress

boolean isReuseAddress()
See Also:
ServerSocket.getReuseAddress()

setReuseAddress

void setReuseAddress(boolean reuseAddress)
See Also:
ServerSocket.setReuseAddress(boolean)

getBacklog

int getBacklog()
Returns the size of the backlog.


setBacklog

void setBacklog(int backlog)
Sets the size of the backlog. This can only be done when this class is not bound


getSessionConfig

SocketSessionConfig getSessionConfig()
Returns the default configuration of the new SocketSessions created by this acceptor service.

Specified by:
getSessionConfig in interface IoService


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.