|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.maverick.nio.DaemonContext
public class DaemonContext
Each instance of a Daemon has a single configuration context.
| 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,
ProtocolContextFactory contextFactory)
Add an interface and port to the listening socket list and provide the protocol context. |
void |
addListeningInterface(String addressToBind,
int portToBind,
ProtocolContextFactory contextFactory)
Add an interface and port to the listening socket list and provide the protocol context. |
ByteBufferPool |
getBufferPool()
Returns a direct buffer pool. |
int |
getIdleServiceRunPeriod()
Get the time in seconds for each idle period service run. |
int |
getInactiveServiceRunsPerIdleEvent()
To determine whether any channels are idle a service run is performed to evaluate the state of each channel. |
ListeningInterface[] |
getListeningInterfaces()
Get the listening socket list. |
int |
getMaximumChannelsPerThread()
Get the maximum number of channels that can be serviced by a single selector thread. |
int |
getPermanentAcceptThreads()
Get the number of permanent accept threads. |
int |
getPermanentConnectThreads()
Get the number of permanent connect threads. |
int |
getPermanentTransferThreads()
Get the number of permanent transfer threads. |
String |
getProduct()
Get the product name used to prefix thread names |
SelectorProvider |
getSelectorProvider()
Get the SelectorProvider used to create Selector instances. |
Daemon |
getServer()
Get the instance of the SSHD for this context. |
boolean |
isUsingDirectBuffers()
Determine whether the daemon is using direct byte buffers. |
static void |
removeEventListener(com.maverick.events.EventListener listener)
|
static void |
removeEventListener(EventListener listener)
|
static void |
removeEventListener(String threadPrefix)
|
void |
removeListeningInterface(InetAddress addressBound,
int portBound)
Remove a listening interface from the daemon at runtime. |
void |
removeListeningInterface(String anInterface)
Deprecated. use removeListeningInterface(String, int) instead. |
void |
removeListeningInterface(String addressBound,
int portBound)
Remove a listening interface from the daemon at runtime. |
void |
setBufferPoolArraySize(int bufferPoolArraySize)
Set the size of the byte buffers in the pool. |
void |
setIdleServiceRunPeriod(int idleServicePeriod)
|
void |
setInactiveServiceRunsPerIdleEvent(int inactivePeriodsPerIdleEvent)
To determine whether any channels are idle a service run is performed to evaluate the state of each channel. |
void |
setMaximumChannelsPerThread(int maximumChannelsPerThread)
Set the maximum number of channels that can be serviced by a single selector thread. |
void |
setPermanentAcceptThreads(int permanentAcceptThreads)
Set the number of permanent accept threads. |
void |
setPermanentConnectThreads(int permanentConnectThreads)
Set the number of permanent connect threads. |
void |
setPermanentTransferThreads(int permanentTransferThreads)
Set the number of permanent transfer threads. |
void |
setProduct(String product)
Set the product name used to prefix thread names |
void |
setSelectorProvider(SelectorProvider selectorProvider)
Set the SelectorProvider used by the Selector threads. |
void |
setUsingDirectBuffers(boolean useDirectByteBuffers)
Configure the byte buffer pool to use direct byte buffers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setProduct(String product)
String - productpublic String getProduct()
public ByteBufferPool getBufferPool()
public void setSelectorProvider(SelectorProvider selectorProvider)
selectorProvider - SelectorProviderpublic SelectorProvider getSelectorProvider()
public Daemon getServer()
public boolean isUsingDirectBuffers()
public void setUsingDirectBuffers(boolean useDirectByteBuffers)
useDirectByteBuffers - booleanpublic void setBufferPoolArraySize(int bufferPoolArraySize)
bufferPoolArraySize - int
public void addListeningInterface(String addressToBind,
int portToBind,
ProtocolContextFactory contextFactory)
throws IOException
addressToBind - StringportToBind - intprotocolContext -
IOException
IOException
public void addListeningInterface(InetAddress addressToBind,
int portToBind,
ProtocolContextFactory contextFactory)
throws IOException
addressToBind - portToBind - context -
IOException
public void removeListeningInterface(InetAddress addressBound,
int portBound)
addressBound - portBound -
public void removeListeningInterface(String addressBound,
int portBound)
throws UnknownHostException
addressBound - portBound -
UnknownHostException
public void removeListeningInterface(String anInterface)
throws IOException
removeListeningInterface(String, int) instead.
String - anInterface
IOExceptionpublic ListeningInterface[] getListeningInterfaces()
public int getPermanentAcceptThreads()
public void setPermanentAcceptThreads(int permanentAcceptThreads)
An accept thread services the asynchronous server socket by processing requests for connections. Once a connection has been accepted it is then registered with a transfer thread where all IO is handled.
The server maintains this number of permanent threads but will also dynamically create additional threads if the permanent threads are overloaded.
permanentAcceptThreads - public int getPermanentConnectThreads()
public void setPermanentConnectThreads(int permanentConnectThreads)
permanentConnectThreads - public int getPermanentTransferThreads()
public void setPermanentTransferThreads(int permanentTransferThreads)
permanentAcceptThreads - public int getMaximumChannelsPerThread()
public void setMaximumChannelsPerThread(int maximumChannelsPerThread)
maximumChannelsPerThread - public int getIdleServiceRunPeriod()
public void setIdleServiceRunPeriod(int idleServicePeriod)
idleServicePeriod - intpublic int getInactiveServiceRunsPerIdleEvent()
public void setInactiveServiceRunsPerIdleEvent(int inactivePeriodsPerIdleEvent)
inactivePeriodsPerIdleEvent - intpublic static void addEventListener(com.maverick.events.EventListener listener)
public static void addEventListener(String threadPrefix,
com.maverick.events.EventListener listener)
public static void addEventListener(EventListener listener)
public static void removeEventListener(String threadPrefix)
public static void removeEventListener(com.maverick.events.EventListener listener)
public static void removeEventListener(EventListener listener)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||