com.maverick.nio
Class DaemonContext<T extends ProtocolContext>

java.lang.Object
  extended by com.maverick.nio.DaemonContext<T>

public class DaemonContext<T extends ProtocolContext>
extends Object

Each instance of a Daemon has a single configuration context.

Author:
Lee David Painter

Method Summary
static void addEventListener(com.maverick.events.EventListener listener)
           
static void addEventListener(EventListener listener)
           
static void addEventListener(String threadPrefix, com.maverick.events.EventListener listener)
           
 void addListeningInterface(InetAddress addressToBind, int portToBind)
          Add an interface and port to the listening socket list and provide the protocol context.
 void addListeningInterface(ListeningInterface li)
           
 void addListeningInterface(String addressToBind, int portToBind)
          Add an interface and port to the listening socket list and provide the protocol context.
 int getBacklog()
           
 ListeningInterface[] getListeningInterfaces()
          Get the listening socket list.
 int getReadBufferSize()
           
 boolean getReuseAddress()
           
 Daemon<T> getServer()
          Get the instance of the SSHD for this context.
static void removeEventListener(String threadPrefix)
           
 void removeListeningInterface(InetAddress addressBound, int portBound)
          Remove a listening interface from the daemon at runtime.
 void removeListeningInterface(String addressBound, int portBound)
          Remove a listening interface from the daemon at runtime.
 void setBacklog(int backlog)
           
 void setReadBufferSize(int readBufferSize)
           
 void setReuseAddress(boolean reuseAddress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServer

public Daemon<T> getServer()
Get the instance of the SSHD for this context.

Returns:

getBacklog

public int getBacklog()

getReuseAddress

public boolean getReuseAddress()

setBacklog

public void setBacklog(int backlog)

setReuseAddress

public void setReuseAddress(boolean reuseAddress)

addListeningInterface

public void addListeningInterface(String addressToBind,
                                  int portToBind)
                           throws IOException
Add an interface and port to the listening socket list and provide the protocol context. handler for subsequent connections.

Parameters:
addressToBind - String
portToBind - int
protocolContext -
Throws:
IOException
IOException

addListeningInterface

public void addListeningInterface(ListeningInterface li)

addListeningInterface

public void addListeningInterface(InetAddress addressToBind,
                                  int portToBind)
                           throws IOException
Add an interface and port to the listening socket list and provide the protocol context.

Parameters:
addressToBind -
portToBind -
context -
Throws:
IOException

removeListeningInterface

public void removeListeningInterface(InetAddress addressBound,
                                     int portBound)
Remove a listening interface from the daemon at runtime.

Parameters:
addressBound -
portBound -

removeListeningInterface

public void removeListeningInterface(String addressBound,
                                     int portBound)
                              throws UnknownHostException
Remove a listening interface from the daemon at runtime.

Parameters:
addressBound -
portBound -
Throws:
UnknownHostException

getListeningInterfaces

public ListeningInterface[] getListeningInterfaces()
Get the listening socket list.

Returns:
InetSocketAddress[]

addEventListener

public static void addEventListener(com.maverick.events.EventListener listener)

addEventListener

public static void addEventListener(String threadPrefix,
                                    com.maverick.events.EventListener listener)

addEventListener

public static void addEventListener(EventListener listener)

removeEventListener

public static void removeEventListener(String threadPrefix)

getReadBufferSize

public int getReadBufferSize()

setReadBufferSize

public void setReadBufferSize(int readBufferSize)


Copyright © 2012. All Rights Reserved.