Package one.nio.server.acceptor
Class MultiAcceptor
- java.lang.Object
-
- one.nio.server.acceptor.MultiAcceptor
-
-
Field Summary
Fields Modifier and Type Field Description private MultiAcceptorGroup[]acceptorGroupsprivate static org.slf4j.Loggerlogprivate MultiAcceptorThreadthread
-
Constructor Summary
Constructors Constructor Description MultiAcceptor(Server server, AcceptorConfig... configs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAcceptedSessions()longgetRejectedSessions()intgetSinglePort()voidreconfigure(AcceptorConfig... configs)voidresetCounters()private voidsetAcceptorGroups(MultiAcceptorGroup[] newGroups)voidshutdown()voidstart()voidsyncStart()private voidvalidateConfig(AcceptorConfig newConfig)
-
-
-
Field Detail
-
log
private static final org.slf4j.Logger log
-
thread
private final MultiAcceptorThread thread
-
acceptorGroups
private volatile MultiAcceptorGroup[] acceptorGroups
-
-
Constructor Detail
-
MultiAcceptor
MultiAcceptor(Server server, AcceptorConfig... configs) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
reconfigure
public void reconfigure(AcceptorConfig... configs) throws java.io.IOException
- Specified by:
reconfigurein interfaceAcceptor- Throws:
java.io.IOException
-
getAcceptedSessions
public long getAcceptedSessions()
- Specified by:
getAcceptedSessionsin interfaceAcceptor
-
getRejectedSessions
public long getRejectedSessions()
- Specified by:
getRejectedSessionsin interfaceAcceptor
-
resetCounters
public void resetCounters()
- Specified by:
resetCountersin interfaceAcceptor
-
getSinglePort
public int getSinglePort()
- Specified by:
getSinglePortin interfaceAcceptor
-
validateConfig
private void validateConfig(AcceptorConfig newConfig)
-
setAcceptorGroups
private void setAcceptorGroups(MultiAcceptorGroup[] newGroups)
-
-