net.gleamynode.netty2
Interface ThreadPooledEventDispatcherMBean

All Superinterfaces:
EventDispatcher, EventDispatcherMBean, ThreadPooledEventDispatcher
All Known Subinterfaces:
OrderedEventDispatcherMBean, SimpleEventDispatcherMBean
All Known Implementing Classes:
OrderedEventDispatcher, SimpleEventDispatcher

public interface ThreadPooledEventDispatcherMBean
extends ThreadPooledEventDispatcher, EventDispatcherMBean

JMX (Java Management eXtenstions) support interface for thread-pooled event dispatchers.

Version:
$Rev: 4 $, $Date: 2005-04-18 12:04:09 +0900 $
Author:
Trustin Lee (http://gleamynode.net/)

Method Summary
 String getThreadNamePrefix()
          Returns the prefix of dispatcher thread name.
 int getThreadPoolSize()
          Returns the number of dispatcher threads.
 int getThreadPriority()
          Returns the priority of dispatcher threads.
 boolean isStarted()
          Returns true if this event dispatcher is started.
 void setThreadNamePrefix(String threadNamePrefix)
          Sets the prefix of dispatcher thread name.
 void setThreadPoolSize(int newSize)
          Sets the number of dispatcher threads.
 void setThreadPriority(int newPriority)
          Sets the priority of dispatcher threads.
 void start()
          Starts this event dispatcher.
 void stop()
          Stops this event dispatcher.
 
Methods inherited from interface net.gleamynode.netty2.EventDispatcher
fire, flush, getWaitingEventSize
 
Methods inherited from interface net.gleamynode.netty2.EventDispatcherMBean
getWaitingEventSize
 

Method Detail

start

public void start()
Description copied from interface: ThreadPooledEventDispatcher
Starts this event dispatcher. this method will silently return if it is already started.

Specified by:
start in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.start()

stop

public void stop()
Description copied from interface: ThreadPooledEventDispatcher
Stops this event dispatcher. This method will silently return if it is already stopped.

Specified by:
stop in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.stop()

isStarted

public boolean isStarted()
Description copied from interface: ThreadPooledEventDispatcher
Returns true if this event dispatcher is started.

Specified by:
isStarted in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.isStarted()

getThreadPoolSize

public int getThreadPoolSize()
Description copied from interface: ThreadPooledEventDispatcher
Returns the number of dispatcher threads.

Specified by:
getThreadPoolSize in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.getThreadPoolSize()

setThreadPoolSize

public void setThreadPoolSize(int newSize)
Description copied from interface: ThreadPooledEventDispatcher
Sets the number of dispatcher threads. This property is adjustable in runtime.

Specified by:
setThreadPoolSize in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.setThreadPoolSize(int)

getThreadPriority

public int getThreadPriority()
Description copied from interface: ThreadPooledEventDispatcher
Returns the priority of dispatcher threads.

Specified by:
getThreadPriority in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.getThreadPriority()

setThreadPriority

public void setThreadPriority(int newPriority)
Description copied from interface: ThreadPooledEventDispatcher
Sets the priority of dispatcher threads.

Specified by:
setThreadPriority in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.setThreadPriority(int)

getThreadNamePrefix

public String getThreadNamePrefix()
Description copied from interface: ThreadPooledEventDispatcher
Returns the prefix of dispatcher thread name.

Specified by:
getThreadNamePrefix in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.getThreadNamePrefix()

setThreadNamePrefix

public void setThreadNamePrefix(String threadNamePrefix)
Description copied from interface: ThreadPooledEventDispatcher
Sets the prefix of dispatcher thread name. This will help you to determine which thread is which when you debug. The actual thread name will be threadNamePrefix + '-' + threadId.

Specified by:
setThreadNamePrefix in interface ThreadPooledEventDispatcher
See Also:
ThreadPooledEventDispatcher.setThreadNamePrefix(String)


Copyright © 2004-2006 Trustin Lee. All Rights Reserved.