org.apache.ftpserver.util
Class AsyncMessageQueue

java.lang.Object
  extended by org.apache.ftpserver.util.AsyncMessageQueue
All Implemented Interfaces:
Runnable

public class AsyncMessageQueue
extends Object
implements Runnable

Simple message queue implementation.

Author:
Rana Bhattacharyya

Constructor Summary
AsyncMessageQueue()
          Constructor - instantiate the queue and start the thread.
 
Method Summary
 void add(Message msg)
          Add a new message object.
 int getMaxSize()
          Get max size
 boolean isDisposed()
          Check whether the message queue is active or not.
 void run()
          Thread starting point - get message ant execute.
 void setMaxSize(int maxSize)
          Set max size
 int size()
          Get the number of elements in the queue.
 void stop()
          Stop the message queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncMessageQueue

public AsyncMessageQueue()
Constructor - instantiate the queue and start the thread.

Method Detail

add

public void add(Message msg)
Add a new message object.


size

public int size()
Get the number of elements in the queue.


getMaxSize

public int getMaxSize()
Get max size


setMaxSize

public void setMaxSize(int maxSize)
Set max size


run

public void run()
Thread starting point - get message ant execute.

Specified by:
run in interface Runnable

stop

public void stop()
Stop the message queue.


isDisposed

public boolean isDisposed()
Check whether the message queue is active or not.



Copyright © 2001-2012 Codehaus. All Rights Reserved.