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 2015/12/18 12:32:26 UTC
mina git commit: Some more javadoc fixes
Repository: mina
Updated Branches:
refs/heads/2.0 970c4a76f -> d5b52476f
Some more javadoc fixes
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/d5b52476
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/d5b52476
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/d5b52476
Branch: refs/heads/2.0
Commit: d5b52476f307a838e230e430b7dabd6d448f9139
Parents: 970c4a7
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Fri Dec 18 12:19:32 2015 +0100
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Fri Dec 18 12:19:32 2015 +0100
----------------------------------------------------------------------
.../main/java/org/apache/mina/core/IoUtil.java | 8 +++
.../org/apache/mina/core/buffer/IoBuffer.java | 3 +-
.../mina/core/buffer/IoBufferAllocator.java | 2 +-
.../mina/core/buffer/IoBufferWrapper.java | 2 +-
.../DefaultIoFilterChainBuilder.java | 55 ++++++++++++++++++++
.../apache/mina/core/filterchain/IoFilter.java | 27 ++++++++++
.../mina/core/filterchain/IoFilterChain.java | 12 ++++-
.../core/filterchain/IoFilterChainBuilder.java | 3 ++
.../org/apache/mina/core/future/IoFuture.java | 3 ++
.../apache/mina/core/future/WriteFuture.java | 2 +-
.../core/polling/AbstractPollingIoAcceptor.java | 2 +
.../polling/AbstractPollingIoConnector.java | 12 ++---
.../mina/core/service/AbstractIoAcceptor.java | 6 +++
.../mina/core/service/AbstractIoConnector.java | 4 ++
.../mina/core/service/AbstractIoService.java | 6 +++
.../org/apache/mina/core/service/IoService.java | 30 +++++++++--
16 files changed, 160 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/IoUtil.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/IoUtil.java b/mina-core/src/main/java/org/apache/mina/core/IoUtil.java
index 6a70ad7..2cc54a4 100644
--- a/mina-core/src/main/java/org/apache/mina/core/IoUtil.java
+++ b/mina-core/src/main/java/org/apache/mina/core/IoUtil.java
@@ -44,6 +44,10 @@ public class IoUtil {
* Writes the specified {@code message} to the specified {@code sessions}.
* If the specified {@code message} is an {@link IoBuffer}, the buffer is
* automatically duplicated using {@link IoBuffer#duplicate()}.
+ *
+ * @param message The message to broadcast
+ * @param sessions The sessions that will receive the message
+ * @return The list of WriteFuture created for each broadcasted message
*/
public static List<WriteFuture> broadcast(Object message, Collection<IoSession> sessions) {
List<WriteFuture> answer = new ArrayList<WriteFuture>(sessions.size());
@@ -55,6 +59,10 @@ public class IoUtil {
* Writes the specified {@code message} to the specified {@code sessions}.
* If the specified {@code message} is an {@link IoBuffer}, the buffer is
* automatically duplicated using {@link IoBuffer#duplicate()}.
+ *
+ * @param message The message to broadcast
+ * @param sessions The sessions that will receive the message
+ * @return The list of WriteFuture created for each broadcasted message
*/
public static List<WriteFuture> broadcast(Object message, Iterable<IoSession> sessions) {
List<WriteFuture> answer = new ArrayList<WriteFuture>();
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
index 8d78d56..11d3199 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
@@ -835,7 +835,8 @@ public abstract class IoBuffer implements Comparable<IoBuffer> {
/**
* @see ByteBuffer#get(byte[])
- *
+ *
+ * @param dst The byte[] that will contain the read bytes
* @return the IoBuffer
*/
public abstract IoBuffer get(byte[] dst);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferAllocator.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferAllocator.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferAllocator.java
index 727285d..d7b347e 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferAllocator.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferAllocator.java
@@ -51,7 +51,7 @@ public interface IoBufferAllocator {
/**
* Wraps the specified NIO {@link ByteBuffer} into MINA buffer.
*
- * @param The {@link ByteBuffer} to wrap
+ * @param nioBuffer The {@link ByteBuffer} to wrap
* @return The {@link IoBuffer} wrapping the {@link ByteBuffer}
*/
IoBuffer wrap(ByteBuffer nioBuffer);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
index 4e6c2f7..78ddaf9 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
@@ -64,7 +64,7 @@ public class IoBufferWrapper extends IoBuffer {
}
/**
- * Returns the parent buffer that this buffer wrapped.
+ * @return the parent buffer that this buffer wrapped.
*/
public IoBuffer getParentBuffer() {
return buf;
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChainBuilder.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChainBuilder.java b/mina-core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChainBuilder.java
index d55ae92..74ffc85 100644
--- a/mina-core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChainBuilder.java
+++ b/mina-core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChainBuilder.java
@@ -74,6 +74,8 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* Creates a new copy of the specified {@link DefaultIoFilterChainBuilder}.
+ *
+ * @param filterChain The FilterChain we will copy
*/
public DefaultIoFilterChainBuilder(DefaultIoFilterChainBuilder filterChain) {
if (filterChain == null) {
@@ -84,6 +86,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#getEntry(String)
+ *
+ * @param name The Filter's name we are looking for
+ * @return The found Entry
*/
public Entry getEntry(String name) {
for (Entry e : entries) {
@@ -97,6 +102,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#getEntry(IoFilter)
+ *
+ * @param filter The Filter we are looking for
+ * @return The found Entry
*/
public Entry getEntry(IoFilter filter) {
for (Entry e : entries) {
@@ -110,6 +118,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#getEntry(Class)
+ *
+ * @param filterType The FilterType we are looking for
+ * @return The found Entry
*/
public Entry getEntry(Class<? extends IoFilter> filterType) {
for (Entry e : entries) {
@@ -123,6 +134,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#get(String)
+ *
+ * @param name The Filter's name we are looking for
+ * @return The found Filter, or null
*/
public IoFilter get(String name) {
Entry e = getEntry(name);
@@ -135,6 +149,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#get(Class)
+ *
+ * @param filterType The FilterType we are looking for
+ * @return The found Filter, or null
*/
public IoFilter get(Class<? extends IoFilter> filterType) {
Entry e = getEntry(filterType);
@@ -147,6 +164,8 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#getAll()
+ *
+ * @return The list of Filters
*/
public List<Entry> getAll() {
return new ArrayList<Entry>(entries);
@@ -154,6 +173,8 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#getAllReversed()
+ *
+ * @return The list of Filters, reversed
*/
public List<Entry> getAllReversed() {
List<Entry> result = getAll();
@@ -163,6 +184,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#contains(String)
+ *
+ * @param name The Filter's name we want to check if it's in the chain
+ * @return <tt>true</tt> if the chain contains the given filter name
*/
public boolean contains(String name) {
return getEntry(name) != null;
@@ -170,6 +194,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#contains(IoFilter)
+ *
+ * @param filter The Filter we want to check if it's in the chain
+ * @return <tt>true</tt> if the chain contains the given filter
*/
public boolean contains(IoFilter filter) {
return getEntry(filter) != null;
@@ -177,6 +204,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#contains(Class)
+ *
+ * @param filterType The FilterType we want to check if it's in the chain
+ * @return <tt>true</tt> if the chain contains the given filterType
*/
public boolean contains(Class<? extends IoFilter> filterType) {
return getEntry(filterType) != null;
@@ -184,6 +214,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#addFirst(String, IoFilter)
+ *
+ * @param name The filter's name
+ * @param filter The filter to add
*/
public synchronized void addFirst(String name, IoFilter filter) {
register(0, new EntryImpl(name, filter));
@@ -191,6 +224,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#addLast(String, IoFilter)
+ *
+ * @param name The filter's name
+ * @param filter The filter to add
*/
public synchronized void addLast(String name, IoFilter filter) {
register(entries.size(), new EntryImpl(name, filter));
@@ -198,6 +234,10 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#addBefore(String, String, IoFilter)
+ *
+ * @param baseName The filter baseName
+ * @param name The filter's name
+ * @param filter The filter to add
*/
public synchronized void addBefore(String baseName, String name, IoFilter filter) {
checkBaseName(baseName);
@@ -213,6 +253,10 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#addAfter(String, String, IoFilter)
+ *
+ * @param baseName The filter baseName
+ * @param name The filter's name
+ * @param filter The filter to add
*/
public synchronized void addAfter(String baseName, String name, IoFilter filter) {
checkBaseName(baseName);
@@ -228,6 +272,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#remove(String)
+ *
+ * @param name The Filter's name to remove from the list of Filters
+ * @return The removed IoFilter
*/
public synchronized IoFilter remove(String name) {
if (name == null) {
@@ -247,6 +294,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#remove(IoFilter)
+ *
+ * @param filter The Filter we want to remove from the list of Filters
+ * @return The removed IoFilter
*/
public synchronized IoFilter remove(IoFilter filter) {
if (filter == null) {
@@ -266,6 +316,9 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
/**
* @see IoFilterChain#remove(Class)
+ *
+ * @param filterType The FilterType we want to remove from the list of Filters
+ * @return The removed IoFilter
*/
public synchronized IoFilter remove(Class<? extends IoFilter> filterType) {
if (filterType == null) {
@@ -324,6 +377,8 @@ public class DefaultIoFilterChainBuilder implements IoFilterChainBuilder {
* a {@link Map} implementation that iterates the filter mapping in the
* order of insertion such as {@link LinkedHashMap}. Otherwise, it will
* throw an {@link IllegalArgumentException}.
+ *
+ * @param filters The list of filters to set
*/
public void setFilters(Map<String, ? extends IoFilter> filters) {
if (filters == null) {
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
index c88c1cd..fdd64fe 100644
--- a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
+++ b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java
@@ -276,48 +276,75 @@ public interface IoFilter {
public interface NextFilter {
/**
* Forwards <tt>sessionCreated</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
*/
void sessionCreated(IoSession session);
/**
* Forwards <tt>sessionOpened</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
*/
void sessionOpened(IoSession session);
/**
* Forwards <tt>sessionClosed</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
*/
void sessionClosed(IoSession session);
/**
* Forwards <tt>sessionIdle</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ * @param status The {@link IdleStatus} type
*/
void sessionIdle(IoSession session, IdleStatus status);
/**
* Forwards <tt>exceptionCaught</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ * @param cause The exception that cause this event to be received
*/
void exceptionCaught(IoSession session, Throwable cause);
+ /**
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ */
void inputClosed(IoSession session);
/**
* Forwards <tt>messageReceived</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ * @param message The received message
*/
void messageReceived(IoSession session, Object message);
/**
* Forwards <tt>messageSent</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ * @param writeRequest The {@link WriteRequest} to process
*/
void messageSent(IoSession session, WriteRequest writeRequest);
/**
* Forwards <tt>filterWrite</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
+ * @param writeRequest The {@link WriteRequest} to process
*/
void filterWrite(IoSession session, WriteRequest writeRequest);
/**
* Forwards <tt>filterClose</tt> event to next filter.
+ *
+ * @param session The {@link IoSession} which has to process this invocation
*/
void filterClose(IoSession session);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
index 8e6c9c5..4dd01ea 100644
--- a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
+++ b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java
@@ -337,12 +337,12 @@ public interface IoFilterChain {
*/
public interface Entry {
/**
- * Returns the name of the filter.
+ * @return the name of the filter.
*/
String getName();
/**
- * Returns the filter.
+ * @return the filter.
*/
IoFilter getFilter();
@@ -353,16 +353,24 @@ public interface IoFilterChain {
/**
* Adds the specified filter with the specified name just before this entry.
+ *
+ * @param name The Filter's name
+ * @param filter The added Filter
*/
void addBefore(String name, IoFilter filter);
/**
* Adds the specified filter with the specified name just after this entry.
+ *
+ * @param name The Filter's name
+ * @param filter The added Filter
*/
void addAfter(String name, IoFilter filter);
/**
* Replace the filter of this entry with the specified new filter.
+ *
+ * @param newFilter The new filter that will be put in the chain
*/
void replace(IoFilter newFilter);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChainBuilder.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChainBuilder.java b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChainBuilder.java
index 7f9d1f5..3cec9fc 100644
--- a/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChainBuilder.java
+++ b/mina-core/src/main/java/org/apache/mina/core/filterchain/IoFilterChainBuilder.java
@@ -52,6 +52,9 @@ public interface IoFilterChainBuilder {
/**
* Modifies the specified <tt>chain</tt>.
+ *
+ * @param chain The chain to modify
+ * @throws Exception If the chain modification failed
*/
void buildFilterChain(IoFilterChain chain) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/future/IoFuture.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/future/IoFuture.java b/mina-core/src/main/java/org/apache/mina/core/future/IoFuture.java
index 67e83be..48697ac 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/IoFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/IoFuture.java
@@ -101,6 +101,9 @@ public interface IoFuture {
/**
* @deprecated Replaced with {@link #awaitUninterruptibly(long)}.
+ *
+ * @param timeoutMillis The time to wait for the join before bailing out
+ * @return <tt>true</tt> if the join was successful
*/
@Deprecated
boolean join(long timeoutMillis);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java b/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
index 8991b37..3584135 100644
--- a/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
+++ b/mina-core/src/main/java/org/apache/mina/core/future/WriteFuture.java
@@ -78,7 +78,7 @@ public interface WriteFuture extends IoFuture {
* completed.
*
* @return the created {@link WriteFuture}
- * @throws InterruptedException
+ * @throws InterruptedException If the wait is interrupted
*/
WriteFuture await() throws InterruptedException;
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java b/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
index 93e4d2d..5c862fb 100644
--- a/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
+++ b/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
@@ -256,6 +256,8 @@ public abstract class AbstractPollingIoAcceptor<S extends AbstractIoSession, H>
/**
* Initialize the polling system, will be called at construction time.
+ *
+ * @param selectorProvider The Selector Provider that will be used by this polling acceptor
* @throws Exception any exception thrown by the underlying system calls
*/
protected abstract void init(SelectorProvider selectorProvider) throws Exception;
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java b/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java
index a782d41..ad68174 100644
--- a/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java
+++ b/mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java
@@ -244,14 +244,12 @@ public abstract class AbstractPollingIoConnector<T extends AbstractIoSession, H>
* {@link SocketAddress}. This operation is non-blocking, so at end of the
* call the socket can be still in connection process.
*
- * @param handle
- * the client socket handle
- * @param remoteAddress
- * the remote address where to connect
+ * @param handle the client socket handle
+ * @param remoteAddress the remote address where to connect
* @return <tt>true</tt> if a connection was established, <tt>false</tt> if
* this client socket is in non-blocking mode and the connection
* operation is in progress
- * @throws Exception
+ * @throws Exception If the connect failed
*/
protected abstract boolean connect(H handle, SocketAddress remoteAddress) throws Exception;
@@ -304,9 +302,9 @@ public abstract class AbstractPollingIoConnector<T extends AbstractIoSession, H>
* processed (connected or failed to connect). All the client socket
* descriptors processed need to be returned by {@link #selectedHandles()}
*
+ * @param timeout The timeout for the select() method
* @return The number of socket having received some data
- * @throws Exception
- * any exception thrown by the underlying systems calls
+ * @throws Exception any exception thrown by the underlying systems calls
*/
protected abstract int select(int timeout) throws Exception;
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoAcceptor.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoAcceptor.java b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoAcceptor.java
index 39df3e5..18492ef 100644
--- a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoAcceptor.java
+++ b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoAcceptor.java
@@ -409,12 +409,18 @@ public abstract class AbstractIoAcceptor extends AbstractIoService implements Io
/**
* Starts the acceptor, and register the given addresses
+ *
+ * @param localAddresses The address to bind to
* @return the {@link Set} of the local addresses which is bound actually
+ * @throws Exception If the bind failed
*/
protected abstract Set<SocketAddress> bindInternal(List<? extends SocketAddress> localAddresses) throws Exception;
/**
* Implement this method to perform the actual unbind operation.
+ *
+ * @param localAddresses The address to unbind from
+ * @throws Exception If the unbind failed
*/
protected abstract void unbind0(List<? extends SocketAddress> localAddresses) throws Exception;
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java
index bad1954..a291932 100644
--- a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java
+++ b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java
@@ -273,7 +273,11 @@ public abstract class AbstractIoConnector extends AbstractIoService implements I
/**
* Implement this method to perform the actual connect operation.
*
+ * @param remoteAddress The remote address to connect from
* @param localAddress <tt>null</tt> if no local address is specified
+ * @param sessionInitializer The IoSessionInitializer to use when the connection s successful
+ * @return The ConnectFuture associated with this asynchronous operation
+ *
*/
protected abstract ConnectFuture connect0(SocketAddress remoteAddress, SocketAddress localAddress,
IoSessionInitializer<? extends ConnectFuture> sessionInitializer);
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoService.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoService.java b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoService.java
index adb5edf..2f58f53 100644
--- a/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoService.java
+++ b/mina-core/src/main/java/org/apache/mina/core/service/AbstractIoService.java
@@ -319,6 +319,8 @@ public abstract class AbstractIoService implements IoService {
/**
* Implement this method to release any acquired resources. This method
* is invoked only once by {@link #dispose()}.
+ *
+ * @throws Exception If the dispose failed
*/
protected abstract void dispose0() throws Exception;
@@ -482,6 +484,10 @@ public abstract class AbstractIoService implements IoService {
* initialization. Do not call this method directly;
* {@link #initSession(IoSession, IoFuture, IoSessionInitializer)} will call
* this method instead.
+ *
+ * @param session The session to initialize
+ * @param future The Future to use
+ *
*/
protected void finishSessionInitialization0(IoSession session, IoFuture future) {
// Do nothing. Extended class might add some specific code
http://git-wip-us.apache.org/repos/asf/mina/blob/d5b52476/mina-core/src/main/java/org/apache/mina/core/service/IoService.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/service/IoService.java b/mina-core/src/main/java/org/apache/mina/core/service/IoService.java
index 2bd325e..c14f20d 100644
--- a/mina-core/src/main/java/org/apache/mina/core/service/IoService.java
+++ b/mina-core/src/main/java/org/apache/mina/core/service/IoService.java
@@ -39,31 +39,35 @@ import org.apache.mina.core.session.IoSessionDataStructureFactory;
*/
public interface IoService {
/**
- * Returns the {@link TransportMetadata} that this service runs on.
+ * @return the {@link TransportMetadata} that this service runs on.
*/
TransportMetadata getTransportMetadata();
/**
* Adds an {@link IoServiceListener} that listens any events related with
* this service.
+ *
+ * @param listener The listener to add
*/
void addListener(IoServiceListener listener);
/**
* Removed an existing {@link IoServiceListener} that listens any events
* related with this service.
+ *
+ * @param listener The listener to use
*/
void removeListener(IoServiceListener listener);
/**
- * Returns <tt>true</tt> if and if only {@link #dispose()} method has
+ * @return <tt>true</tt> if and if only {@link #dispose()} method has
* been called. Please note that this method will return <tt>true</tt>
* even after all the related resources are released.
*/
boolean isDisposing();
/**
- * Returns <tt>true</tt> if and if only all resources of this processor
+ * @return <tt>true</tt> if and if only all resources of this processor
* have been disposed.
*/
boolean isDisposed();
@@ -87,12 +91,14 @@ public interface IoService {
void dispose(boolean awaitTermination);
/**
- * Returns the handler which will handle all connections managed by this service.
+ * @return the handler which will handle all connections managed by this service.
*/
IoHandler getHandler();
/**
* Sets the handler which will handle all connections managed by this service.
+ *
+ * @param handler The IoHandler to use
*/
void setHandler(IoHandler handler);
@@ -108,12 +114,16 @@ public interface IoService {
/**
* Returns the number of all sessions which are currently managed by this
* service.
+ *
+ * @return The number of managed sessions
*/
int getManagedSessionCount();
/**
* Returns the default configuration of the new {@link IoSession}s
* created by this service.
+ *
+ * @return The session config
*/
IoSessionConfig getSessionConfig();
@@ -122,6 +132,8 @@ public interface IoService {
* {@link IoFilterChain} of all {@link IoSession}s which is created
* by this service.
* The default value is an empty {@link DefaultIoFilterChainBuilder}.
+ *
+ * @return The filter chain builder in use
*/
IoFilterChainBuilder getFilterChainBuilder();
@@ -131,6 +143,8 @@ public interface IoService {
* by this service.
* If you specify <tt>null</tt> this property will be set to
* an empty {@link DefaultIoFilterChainBuilder}.
+ *
+ * @param builder The filter chain builder to use
*/
void setFilterChainBuilder(IoFilterChainBuilder builder);
@@ -141,6 +155,7 @@ public interface IoService {
* won't affect the existing {@link IoSession}s at all, because
* {@link IoFilterChainBuilder}s affect only newly created {@link IoSession}s.
*
+ * @return The filter chain in use
* @throws IllegalStateException if the current {@link IoFilterChainBuilder} is
* not a {@link DefaultIoFilterChainBuilder}
*/
@@ -165,18 +180,25 @@ public interface IoService {
* Writes the specified {@code message} to all the {@link IoSession}s
* managed by this service. This method is a convenience shortcut for
* {@link IoUtil#broadcast(Object, Collection)}.
+ *
+ * @param message the message to broadcast
+ * @return The set of WriteFuture associated to the message being broadcasted
*/
Set<WriteFuture> broadcast(Object message);
/**
* Returns the {@link IoSessionDataStructureFactory} that provides
* related data structures for a new session created by this service.
+ *
+ * @return The used session factory
*/
IoSessionDataStructureFactory getSessionDataStructureFactory();
/**
* Sets the {@link IoSessionDataStructureFactory} that provides
* related data structures for a new session created by this service.
+ *
+ * @param sessionDataStructureFactory The factory to use
*/
void setSessionDataStructureFactory(IoSessionDataStructureFactory sessionDataStructureFactory);