Package org.apache.mina.transport.socket
Interface DatagramAcceptor
-
- All Superinterfaces:
IoAcceptor,IoService
- All Known Implementing Classes:
NioDatagramAcceptor
public interface DatagramAcceptor extends IoAcceptor
IoAcceptorfor datagram transport (UDP/IP).- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InetSocketAddressgetDefaultLocalAddress()Returns the default local address to bind when no argument is specified inIoAcceptor.bind()method.InetSocketAddressgetLocalAddress()Returns the local address which is bound currently.DatagramSessionConfiggetSessionConfig()IoSessionRecyclergetSessionRecycler()voidsetDefaultLocalAddress(InetSocketAddress localAddress)Sets the default local InetSocketAddress to bind when no argument is specified inIoAcceptor.bind()method.voidsetSessionRecycler(IoSessionRecycler sessionRecycler)Sets theIoSessionRecyclerfor this service.-
Methods inherited from interface org.apache.mina.core.service.IoAcceptor
bind, 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, dispose, getActivationTime, getFilterChain, getFilterChainBuilder, getHandler, getManagedSessionCount, getManagedSessions, getScheduledWriteBytes, getScheduledWriteMessages, getSessionDataStructureFactory, getStatistics, getTransportMetadata, isActive, isDisposed, isDisposing, removeListener, setFilterChainBuilder, setHandler, setSessionDataStructureFactory
-
-
-
-
Method Detail
-
getLocalAddress
InetSocketAddress getLocalAddress()
Description copied from interface:IoAcceptorReturns 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:
getLocalAddressin interfaceIoAcceptor- Returns:
- the local InetSocketAddress 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.
This method overrides the
IoAcceptor.getLocalAddress()method.
-
getDefaultLocalAddress
InetSocketAddress getDefaultLocalAddress()
Description copied from interface:IoAcceptorReturns the default local address to bind when no argument is specified inIoAcceptor.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 inIoAcceptor.setDefaultLocalAddresses(List).- Specified by:
getDefaultLocalAddressin interfaceIoAcceptor- Returns:
- a
Setof the local InetSocketAddress which are bound currently. This method overrides theIoAcceptor.getDefaultLocalAddress()method.
-
setDefaultLocalAddress
void setDefaultLocalAddress(InetSocketAddress localAddress)
Sets the default local InetSocketAddress to bind when no argument is specified inIoAcceptor.bind()method. Please note that the default will not be used if any local InetSocketAddress is specified. This method overrides theIoAcceptor.setDefaultLocalAddress(java.net.SocketAddress)method.- Parameters:
localAddress- The local address
-
getSessionRecycler
IoSessionRecycler getSessionRecycler()
- Returns:
- the
IoSessionRecyclerfor this service.
-
setSessionRecycler
void setSessionRecycler(IoSessionRecycler sessionRecycler)
Sets theIoSessionRecyclerfor this service.- Parameters:
sessionRecycler-nullto use the default recycler
-
getSessionConfig
DatagramSessionConfig getSessionConfig()
- Specified by:
getSessionConfigin interfaceIoService- Returns:
- the default Datagram configuration of the new
IoSessions created by this service.
-
-