You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2010/01/13 01:46:25 UTC
svn commit: r898585 -
/mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
Author: elecharny
Date: Wed Jan 13 00:46:25 2010
New Revision: 898585
URL: http://svn.apache.org/viewvc?rev=898585&view=rev
Log:
Update the Javadoc to fix DIRMINA-754
Modified:
mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
Modified: mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java?rev=898585&r1=898584&r2=898585&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java Wed Jan 13 00:46:25 2010
@@ -37,32 +37,41 @@
public interface IoFilterChain {
/**
* Returns the parent {@link IoSession} of this chain.
+ *
* @return {@link IoSession}
*/
IoSession getSession();
/**
* Returns the {@link Entry} with the specified <tt>name</tt> in this chain.
+ *
+ * @param name The filter's name we are looking for
* @return <tt>null</tt> if there's no such name in this chain
*/
Entry getEntry(String name);
/**
* Returns the {@link Entry} with the specified <tt>filter</tt> in this chain.
+ *
+ * @param filter The Filter we are looking for
* @return <tt>null</tt> if there's no such filter in this chain
*/
Entry getEntry(IoFilter filter);
/**
* Returns the {@link Entry} with the specified <tt>filterType</tt>
- * in this chain. If there's more than one filter with the specified
+ * in this chain. If there's more than one filter with the specified
* type, the first match will be chosen.
+ *
+ * @param filterType The filter class we are looking for
* @return <tt>null</tt> if there's no such name in this chain
*/
Entry getEntry(Class<? extends IoFilter> filterType);
/**
* Returns the {@link IoFilter} with the specified <tt>name</tt> in this chain.
+ *
+ * @param name the filter's name
* @return <tt>null</tt> if there's no such name in this chain
*/
IoFilter get(String name);
@@ -71,6 +80,8 @@
* Returns the {@link IoFilter} with the specified <tt>filterType</tt>
* in this chain. If there's more than one filter with the specified
* type, the first match will be chosen.
+ *
+ * @param filterType The filter class
* @return <tt>null</tt> if there's no such name in this chain
*/
IoFilter get(Class<? extends IoFilter> filterType);
@@ -78,6 +89,8 @@
/**
* Returns the {@link NextFilter} of the {@link IoFilter} with the
* specified <tt>name</tt> in this chain.
+ *
+ * @param name The filter's name we want the next filter
* @return <tt>null</tt> if there's no such name in this chain
*/
NextFilter getNextFilter(String name);
@@ -85,6 +98,8 @@
/**
* Returns the {@link NextFilter} of the specified {@link IoFilter}
* in this chain.
+ *
+ * @param filter The filter for which we want the next filter
* @return <tt>null</tt> if there's no such name in this chain
*/
NextFilter getNextFilter(IoFilter filter);
@@ -93,68 +108,78 @@
* Returns the {@link NextFilter} of the specified <tt>filterType</tt>
* in this chain. If there's more than one filter with the specified
* type, the first match will be chosen.
+ *
+ * @param filterType The Filter class for which we want the next filter
* @return <tt>null</tt> if there's no such name in this chain
*/
NextFilter getNextFilter(Class<? extends IoFilter> filterType);
/**
- * Returns the list of all {@link Entry}s this chain contains.
+ * @return The list of all {@link Entry}s this chain contains.
*/
List<Entry> getAll();
/**
- * Returns the reversed list of all {@link Entry}s this chain contains.
+ * @return The reversed list of all {@link Entry}s this chain contains.
*/
List<Entry> getAllReversed();
/**
- * Returns <tt>true</tt> if this chain contains an {@link IoFilter} with the
+ * @param name The filter's name we are looking for
+ *
+ * @return <tt>true</tt> if this chain contains an {@link IoFilter} with the
* specified <tt>name</tt>.
*/
boolean contains(String name);
/**
- * Returns <tt>true</tt> if this chain contains the specified <tt>filter</tt>.
+ * @param filter The filter we are looking for
+ *
+ * @return <tt>true</tt> if this chain contains the specified <tt>filter</tt>.
*/
boolean contains(IoFilter filter);
/**
- * Returns <tt>true</tt> if this chain contains an {@link IoFilter} of the
+ * @param filterType The filter's class we are looking for
+ *
+ * @return <tt>true</tt> if this chain contains an {@link IoFilter} of the
* specified <tt>filterType</tt>.
*/
boolean contains(Class<? extends IoFilter> filterType);
/**
* Adds the specified filter with the specified name at the beginning of this chain.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
+ *
+ * @param name The filter's name
+ * @param filter The filter to add
*/
void addFirst(String name, IoFilter filter);
/**
* Adds the specified filter with the specified name at the end of this chain.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
+ *
+ * @param name The filter's name
+ * @param filter The filter to add
*/
void addLast(String name, IoFilter filter);
/**
* Adds the specified filter with the specified name just before the filter whose name is
* <code>baseName</code> in this chain.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
+ *
+ * @param baseName The targeted Filter's name
+ * @param name The filter's name
+ * @param filter The filter to add
*/
void addBefore(String baseName, String name, IoFilter filter);
/**
* Adds the specified filter with the specified name just after the filter whose name is
* <code>baseName</code> in this chain.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
+ *
+ * @param baseName The targeted Filter's name
+ * @param name The filter's name
+ * @param filter The filter to add
*/
void addAfter(String baseName, String name, IoFilter filter);
@@ -162,8 +187,9 @@
* Replace the filter with the specified name with the specified new
* filter.
*
+ * @param name The name of the filter we want to replace
+ * @param newFilter The new filter
* @return the old filter
- * @throws IllegalArgumentException if there's no such filter
*/
IoFilter replace(String name, IoFilter newFilter);
@@ -171,7 +197,8 @@
* Replace the filter with the specified name with the specified new
* filter.
*
- * @throws IllegalArgumentException if there's no such filter
+ * @param oldFilter The filter we want to replace
+ * @param newFilter The new filter
*/
void replace(IoFilter oldFilter, IoFilter newFilter);
@@ -180,15 +207,16 @@
* filter. If there's more than one filter with the specified type,
* the first match will be replaced.
*
- * @throws IllegalArgumentException if there's no such filter
+ * @param oldFilterType The filter class we want to replace
+ * @param newFilter The new filter
*/
IoFilter replace(Class<? extends IoFilter> oldFilterType, IoFilter newFilter);
/**
* Removes the filter with the specified name from this chain.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostRemove(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#destroy()} throws an exception.
+ *
+ * @param name The name of the filter to remove
+ * @return The removed filter
*/
IoFilter remove(String name);
@@ -196,7 +224,7 @@
* Replace the filter with the specified name with the specified new
* filter.
*
- * @throws IllegalArgumentException if there's no such filter
+ * @param name The filter to remove
*/
void remove(IoFilter filter);
@@ -205,75 +233,85 @@
* filter. If there's more than one filter with the specified type,
* the first match will be replaced.
*
- * @throws IllegalArgumentException if there's no such filter
+ * @param name The filter class to remove
+ * @return The removed filter
*/
IoFilter remove(Class<? extends IoFilter> filterType);
/**
* Removes all filters added to this chain.
- * @throws Exception if {@link IoFilter#onPostRemove(IoFilterChain, String, NextFilter)} thrown an exception.
*/
void clear() throws Exception;
/**
- * Fires a {@link IoHandler#sessionCreated(IoSession)} event. Most users don't need to
- * call this method at all. Please use this method only when you implement a new transport
+ * Fires a {@link IoHandler#sessionCreated(IoSession)} event. Most users don't need to
+ * call this method at all. Please use this method only when you implement a new transport
* or fire a virtual event.
*/
public void fireSessionCreated();
/**
- * Fires a {@link IoHandler#sessionOpened(IoSession)} event. Most users don't need to call
- * this method at all. Please use this method only when you implement a new transport or
+ * Fires a {@link IoHandler#sessionOpened(IoSession)} event. Most users don't need to call
+ * this method at all. Please use this method only when you implement a new transport or
* fire a virtual event.
*/
public void fireSessionOpened();
/**
- * Fires a {@link IoHandler#sessionClosed(IoSession)} event. Most users don't need to call
- * this method at all. Please use this method only when you implement a new transport or
+ * Fires a {@link IoHandler#sessionClosed(IoSession)} event. Most users don't need to call
+ * this method at all. Please use this method only when you implement a new transport or
* fire a virtual event.
*/
public void fireSessionClosed();
/**
- * Fires a {@link IoHandler#sessionIdle(IoSession, IdleStatus)} event. Most users don't
- * need to call this method at all. Please use this method only when you implement a new
+ * Fires a {@link IoHandler#sessionIdle(IoSession, IdleStatus)} event. Most users don't
+ * need to call this method at all. Please use this method only when you implement a new
* transport or fire a virtual event.
+ *
+ * @param status The current status to propagate
*/
public void fireSessionIdle(IdleStatus status);
/**
- * Fires a {@link #fireMessageReceived(Object)} event. Most users don't need to
- * call this method at all. Please use this method only when you implement a new transport
+ * Fires a {@link IoHandler#messageReceived(Object)} event. Most users don't need to
+ * call this method at all. Please use this method only when you implement a new transport
* or fire a virtual event.
+ *
+ * @param message The received message
*/
public void fireMessageReceived(Object message);
/**
- * Fires a {@link IoHandler#sessionOpened(IoSession)} event. Most users don't need to call
- * this method at all. Please use this method only when you implement a new transport or
+ * Fires a {@link IoHandler#messageSent(IoSession)} event. Most users don't need to call
+ * this method at all. Please use this method only when you implement a new transport or
* fire a virtual event.
+ *
+ * @param request The sent request
*/
public void fireMessageSent(WriteRequest request);
/**
- * Fires a {@link IoHandler#exceptionCaught(IoSession, Throwable)} event. Most users don't
- * need to call this method at all. Please use this method only when you implement a new
+ * Fires a {@link IoHandler#exceptionCaught(IoSession, Throwable)} event. Most users don't
+ * need to call this method at all. Please use this method only when you implement a new
* transport or fire a virtual event.
+ *
+ * @param cause The exception cause
*/
public void fireExceptionCaught(Throwable cause);
/**
- * Fires a {@link IoSession#write(Object)} event. Most users don't need to call this
- * method at all. Please use this method only when you implement a new transport or fire a
+ * Fires a {@link IoSession#write(Object)} event. Most users don't need to call this
+ * method at all. Please use this method only when you implement a new transport or fire a
* virtual event.
+ *
+ * @param writeRequest The message to write
*/
public void fireFilterWrite(WriteRequest writeRequest);
/**
- * Fires a {@link IoSession#close()} event. Most users don't need to call this method at
- * all. Please use this method only when you implement a new transport or fire a virtual
+ * Fires a {@link IoSession#close()} event. Most users don't need to call this method at
+ * all. Please use this method only when you implement a new transport or fire a virtual
* event.
*/
public void fireFilterClose();
@@ -295,32 +333,22 @@
IoFilter getFilter();
/**
- * Returns the {@link NextFilter} of the filter.
- *
- * @throws IllegalStateException if the {@link NextFilter} is not available
+ * @return The {@link NextFilter} of the filter.
*/
NextFilter getNextFilter();
/**
* Adds the specified filter with the specified name just before this entry.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
*/
void addBefore(String name, IoFilter filter);
/**
* Adds the specified filter with the specified name just after this entry.
- * @throws IoFilterLifeCycleException
- * if {@link IoFilter#onPostAdd(IoFilterChain, String, NextFilter)} or
- * {@link IoFilter#init()} throws an exception.
*/
void addAfter(String name, IoFilter filter);
/**
* Replace the filter of this entry with the specified new filter.
- *
- * @throws IllegalArgumentException if there's no such filter
*/
void replace(IoFilter newFilter);