Class ListeningSocketChannel

java.lang.Object
net.messagevortex.transport.ListeningSocketChannel
Direct Known Subclasses:
ImapServer

public class ListeningSocketChannel extends Object
  • Constructor Details

    • ListeningSocketChannel

      public ListeningSocketChannel(InetSocketAddress address, SocketListener listener) throws IOException

      Creates a listening socket channel.

      Parameters:
      address - the socket to be bound
      listener - the listener to be used for incomming connections
      Throws:
      IOException - if the address cannot be bound
  • Method Details

    • setSocketListener

      public SocketListener setSocketListener(SocketListener listener)
    • setName

      public void setName(String name)
    • getName

      public String getName()
    • getSocketListener

      public SocketListener getSocketListener()
    • setProtocol

      public String setProtocol(String protocol)

      Set the protocol identifier of the channel.

      Parameters:
      protocol - the identifier string to be set
      Returns:
      the previously set identifier
    • setSecurityContext

      public SecurityContext setSecurityContext(SecurityContext context)

      Sets the security context of the socket channel.

      Parameters:
      context - the context to be set
      Returns:
      the previously set context
    • getSecurityContext

      public SecurityContext getSecurityContext()

      Gets the security context of the channel.

      Returns:
      the currently set security context
    • getPort

      public int getPort()

      Gets the currently used local port.

      Returns:
      the local port number
    • getProtocol

      public String getProtocol()
    • shutdown

      public void shutdown()

      Shutdown the socket channel.

    • isShutdown

      public boolean isShutdown()