Tabnine Logo
IoAcceptor
Code IndexAdd Tabnine to your IDE (free)

How to use
IoAcceptor
in
org.littleshoot.mina.common

Best Java code snippets using org.littleshoot.mina.common.IoAcceptor (Showing top 14 results out of 315)

origin: org.littleshoot/mina-port

public void unbindAll() {
  delegate.unbindAll();
}
origin: org.littleshoot/mina-port

public void addListener(IoServiceListener listener) {
  delegate.addListener(listener);
}
origin: org.littleshoot/mina-port

public void bind(SocketAddress address, IoHandler handler)
    throws IOException {
  delegate.bind(address, handler);
}
origin: org.littleshoot/mina-port

public Set<IoSession> getManagedSessions(SocketAddress serviceAddress) {
  return delegate.getManagedSessions(serviceAddress);
}
origin: org.littleshoot/mina-port

public Set<SocketAddress> getManagedServiceAddresses() {
  return delegate.getManagedServiceAddresses();
}
origin: org.littleshoot/mina-port

public IoFilterChainBuilder getFilterChainBuilder() {
  return delegate.getFilterChainBuilder();
}
origin: org.littleshoot/mina-port

public IoSession newSession(SocketAddress remoteAddress,
    SocketAddress localAddress) {
  return delegate.newSession(remoteAddress, localAddress);
}
origin: org.littleshoot/mina-port

public IoServiceConfig getDefaultConfig() {
  return delegate.getDefaultConfig();
}
origin: org.littleshoot/mina-port

public DefaultIoFilterChainBuilder getFilterChain() {
  return delegate.getFilterChain();
}
origin: org.littleshoot/mina-port

public boolean isManaged(SocketAddress address) {
  return delegate.isManaged(address);
}
origin: org.littleshoot/littleshoot-ice

log.debug("Unbinding all!!");
final IoAcceptor acceptor = (IoAcceptor) service;
acceptor.unbindAll();
origin: org.littleshoot/mina-port

public void bind(SocketAddress address, IoHandler handler,
    IoServiceConfig config) throws IOException {
  delegate.bind(address, handler, config);
}
origin: org.littleshoot/littleshoot-ice

log.info("Unbinding all!!");
final IoAcceptor acceptor = (IoAcceptor) service;
acceptor.unbindAll();
origin: org.littleshoot/littleshoot-ice

  private void clear(final IoSession session, final IceStunUdpPeer stunUdpPeer, 
    final IceAgent iceAgent) {
    log.info("Closing ICE agent");
    iceAgent.close();
    log.info("Clearing session!!");
    final DatagramSessionImpl dgSession = (DatagramSessionImpl) session;
    final DatagramChannel dgChannel = dgSession.getChannel();
    session.close().join(10 * 1000);

    final StunServer stunServer = stunUdpPeer.getStunServer();
    stunServer.close();
    try {
      final IoService service = session.getService();
      log.info("Service is: {}", service);
      if (IoAcceptor.class.isAssignableFrom(service.getClass())) {
        log.info("Unbinding all!!");
        final IoAcceptor acceptor = (IoAcceptor) service;
        acceptor.unbindAll();
      }
      session.getService().getFilterChain().clear();
      dgChannel.disconnect();
      dgChannel.close();
    } catch (final Exception e) {
      log.error("Error clearing session!!", e);
    } finally {
      stunUdpPeer.close();
    }
  }
}
org.littleshoot.mina.commonIoAcceptor

Javadoc

Accepts incoming connection, communicates with clients, and fires events to IoHandlers.

Please refer to EchoServer example.

You should bind to the desired socket address to accept incoming connections, and then events for incoming connections will be sent to the specified default IoHandler.

Threads accept incoming connections start automatically when #bind(SocketAddress,IoHandler) is invoked, and stop when all addresses are unbound.

Most used methods

  • unbindAll
    Unbinds all addresses which were bound by this acceptor.
  • addListener
  • bind
    Binds to the specified address and handles incoming connections with the specified handler.
  • getDefaultConfig
  • getFilterChain
  • getFilterChainBuilder
  • getManagedServiceAddresses
  • getManagedSessions
  • isManaged
  • newSession
    (Optional) Returns an IoSession that is bound to the specifiedlocalAddress and remoteAddress which
  • removeListener
  • setFilterChainBuilder
  • removeListener,
  • setFilterChainBuilder,
  • unbind

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JButton (javax.swing)
  • JComboBox (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now