public class ImapServer extends ListeningSocketChannel implements StoppableThread, SocketListener
Constructor and Description |
---|
ImapServer(InetSocketAddress addr,
SecurityContext enc)
Creates an IMAP server listening on the specified socket address.
|
ImapServer(SecurityContext secContext)
Creates an IMAP server listening the default port on all interfaces of the server.
|
Modifier and Type | Method and Description |
---|---|
long |
getTimeout()
Gets the timeout for new incoming connections.
|
void |
gotConnect(ServerConnection ac) |
boolean |
isShutdown()
Query if the process is marked for shutdown.
|
AuthenticationProxy |
setAuth(AuthenticationProxy ap)
Sets the authentication proxy for incoming connections.
|
long |
setTimeout(long timeout)
Sets the timeout for new incoming connections.
|
void |
shutdown()
Shutdown the socket channel.
|
getName, getPort, getProtocol, getSecurityContext, getSocketListener, setName, setProtocol, setSecurityContext, setSocketListener
public ImapServer(SecurityContext secContext) throws IOException
Creates an IMAP server listening the default port on all interfaces of the server.
secContext
- the security context for the serverIOException
- if socket binding failspublic ImapServer(InetSocketAddress addr, SecurityContext enc) throws IOException
Creates an IMAP server listening on the specified socket address.
addr
- the socket address to be used by the serverenc
- the security context for the serverIOException
- if socket binding failspublic AuthenticationProxy setAuth(AuthenticationProxy ap)
Sets the authentication proxy for incoming connections.
ap
- the new proxypublic void gotConnect(ServerConnection ac)
gotConnect
in interface SocketListener
public boolean isShutdown()
StoppableThread
Query if the process is marked for shutdown.
isShutdown
in interface StoppableThread
isShutdown
in class ListeningSocketChannel
public void shutdown()
ListeningSocketChannel
Shutdown the socket channel.
shutdown
in interface StoppableThread
shutdown
in class ListeningSocketChannel
public long getTimeout()
Gets the timeout for new incoming connections.
public long setTimeout(long timeout)
Sets the timeout for new incoming connections.
timeout
- the timeout in milli secondsCopyright © 2023. All rights reserved.