Interface IoService

    • Method Detail

      • getManagedServiceAddresses

        java.util.Set<java.net.SocketAddress> getManagedServiceAddresses()
        Returns all SocketAddresses this service is managing. If this service is an IoAcceptor, a set of bind addresses will be returned. If this service is an IoConnector, a set of remote addresses will be returned.
      • isManaged

        boolean isManaged​(java.net.SocketAddress serviceAddress)
        Returns true if this service is managing the specified serviceAddress. If this service is an IoAcceptor, serviceAddress is a bind address. If this service is an IoConnector, serviceAddress is a remote address.
      • getManagedSessions

        java.util.Set<IoSession> getManagedSessions​(java.net.SocketAddress serviceAddress)
        Returns all sessions with the specified remote or local address, which are currently managed by this service. IoAcceptor will assume the specified address is a local address, and IoConnector will assume it's a remote address.
        Parameters:
        serviceAddress - the address to return all sessions for.
        Returns:
        the sessions. An empty collection if there's no session.
        Throws:
        java.lang.IllegalArgumentException - if the specified address has not been bound.
        java.lang.UnsupportedOperationException - if this operation isn't supported for the particular transport type implemented by this IoService.
      • getDefaultConfig

        IoServiceConfig getDefaultConfig()
        Returns the default configuration which is used when you didn't specify any configuration.