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/07/28 11:44:57 UTC
[1/4] mina git commit: Returning the CloseFuture when doing a close()
Repository: mina
Updated Branches:
refs/heads/2.0 d5393beec -> e81c0eb01
Returning the CloseFuture when doing a close()
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/41d11b96
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/41d11b96
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/41d11b96
Branch: refs/heads/2.0
Commit: 41d11b96331cc792111e9de777d170f72c1f1153
Parents: 0aea087
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Thu Jan 8 18:56:21 2015 +0100
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Thu Jan 8 18:56:21 2015 +0100
----------------------------------------------------------------------
.../mina/core/session/AbstractIoSession.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/41d11b96/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
index 8c06e73..f59adf2 100644
--- a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
+++ b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
@@ -59,7 +59,7 @@ import org.apache.mina.util.ExceptionMonitor;
/**
* Base implementation of {@link IoSession}.
- *
+ *
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public abstract class AbstractIoSession implements IoSession {
@@ -92,7 +92,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* An internal write request object that triggers session close.
- *
+ *
* @see #writeRequestQueue
*/
private static final WriteRequest CLOSE_REQUEST = new DefaultWriteRequest(new Object());
@@ -203,7 +203,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* {@inheritDoc}
- *
+ *
* We use an AtomicLong to guarantee that the session ID are unique.
*/
public final long getId() {
@@ -270,7 +270,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* Set the scheduledForFLush flag. As we may have concurrent access to this
* flag, we compare and set it in one call.
- *
+ *
* @param schedule
* the new value to set if not already set.
* @return true if the session flag has been set, and if it wasn't set
@@ -294,7 +294,9 @@ public abstract class AbstractIoSession implements IoSession {
public final CloseFuture close(boolean rightNow) {
if (!isClosing()) {
if (rightNow) {
- return close();
+ CloseFuture closeFuture = close();
+
+ return closeFuture;
}
return closeOnFlush();
@@ -630,7 +632,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* Create a new close aware write queue, based on the given write queue.
- *
+ *
* @param writeRequestQueue
* The write request queue
*/
@@ -1275,7 +1277,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* Fires a {@link IoEventType#SESSION_IDLE} event to any applicable sessions
* in the specified collection.
- *
+ *
* @param currentTime
* the current time (i.e. {@link System#currentTimeMillis()})
*/
@@ -1290,7 +1292,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* Fires a {@link IoEventType#SESSION_IDLE} event if applicable for the
* specified {@code session}.
- *
+ *
* @param currentTime
* the current time (i.e. {@link System#currentTimeMillis()})
*/
@@ -1335,7 +1337,7 @@ public abstract class AbstractIoSession implements IoSession {
/**
* A queue which handles the CLOSE request.
- *
+ *
* TODO : Check that when closing a session, all the pending requests are
* correctly sent.
*/
[2/4] mina git commit: Formtted the code
Posted by el...@apache.org.
Formtted the code
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/1c66509a
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/1c66509a
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/1c66509a
Branch: refs/heads/2.0
Commit: 1c66509a877d112bbefddfd1b4137a8677c4e2d0
Parents: 41d11b9
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Thu Jan 8 18:57:04 2015 +0100
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Thu Jan 8 18:57:04 2015 +0100
----------------------------------------------------------------------
.../mina/statemachine/event/IoFilterEvents.java | 15 +++++++++++----
.../mina/statemachine/event/IoHandlerEvents.java | 11 ++++++++---
2 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/1c66509a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java
----------------------------------------------------------------------
diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java
index 2afa25a..16dccdc 100644
--- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java
+++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoFilterEvents.java
@@ -29,10 +29,17 @@ import org.apache.mina.statemachine.annotation.IoFilterTransition;
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public enum IoFilterEvents {
- ANY(Event.WILDCARD_EVENT_ID), SESSION_CREATED("sessionCreated"), SESSION_OPENED("sessionOpened"), SESSION_CLOSED(
- "sessionClosed"), SESSION_IDLE("sessionIdle"), MESSAGE_RECEIVED("messageReceived"), MESSAGE_SENT(
- "messageSent"), EXCEPTION_CAUGHT("exceptionCaught"), CLOSE("filterClose"), WRITE("filterWrite"), SET_TRAFFIC_MASK(
- "filterSetTrafficMask");
+ ANY(Event.WILDCARD_EVENT_ID),
+ SESSION_CREATED("sessionCreated"),
+ SESSION_OPENED("sessionOpened"),
+ SESSION_CLOSED("sessionClosed"),
+ SESSION_IDLE("sessionIdle"),
+ MESSAGE_RECEIVED("messageReceived"),
+ MESSAGE_SENT("messageSent"),
+ EXCEPTION_CAUGHT("exceptionCaught"),
+ CLOSE("filterClose"),
+ WRITE("filterWrite"),
+ SET_TRAFFIC_MASK("filterSetTrafficMask");
private final String value;
http://git-wip-us.apache.org/repos/asf/mina/blob/1c66509a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java
----------------------------------------------------------------------
diff --git a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java
index 0796c36..5b1dc0b 100644
--- a/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java
+++ b/mina-statemachine/src/main/java/org/apache/mina/statemachine/event/IoHandlerEvents.java
@@ -29,9 +29,14 @@ import org.apache.mina.statemachine.annotation.IoHandlerTransition;
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public enum IoHandlerEvents {
- ANY(Event.WILDCARD_EVENT_ID), SESSION_CREATED("sessionCreated"), SESSION_OPENED("sessionOpened"), SESSION_CLOSED(
- "sessionClosed"), SESSION_IDLE("sessionIdle"), MESSAGE_RECEIVED("messageReceived"), MESSAGE_SENT(
- "messageSent"), EXCEPTION_CAUGHT("exceptionCaught");
+ ANY(Event.WILDCARD_EVENT_ID),
+ SESSION_CREATED("sessionCreated"),
+ SESSION_OPENED("sessionOpened"),
+ SESSION_CLOSED("sessionClosed"),
+ SESSION_IDLE("sessionIdle"),
+ MESSAGE_RECEIVED("messageReceived"),
+ MESSAGE_SENT("messageSent"),
+ EXCEPTION_CAUGHT("exceptionCaught");
private final String value;
[3/4] mina git commit: Merge branch '2.0' of
https://git-wip-us.apache.org/repos/asf/mina into 2.0
Posted by el...@apache.org.
Merge branch '2.0' of https://git-wip-us.apache.org/repos/asf/mina into 2.0
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/ff174e81
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/ff174e81
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/ff174e81
Branch: refs/heads/2.0
Commit: ff174e8195b18f290d4a4151c82f56be5ce26f2d
Parents: 1c66509 d5393be
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Sun Jul 26 10:48:29 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Sun Jul 26 10:48:29 2015 +0200
----------------------------------------------------------------------
mina-core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[4/4] mina git commit: Patch for DIRMINA-1017
Posted by el...@apache.org.
Patch for DIRMINA-1017
Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/e81c0eb0
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/e81c0eb0
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/e81c0eb0
Branch: refs/heads/2.0
Commit: e81c0eb0141559569fd054812e5d8fefcd27f271
Parents: ff174e8
Author: Emmanuel Lécharny <el...@symas.com>
Authored: Tue Jul 28 11:44:43 2015 +0200
Committer: Emmanuel Lécharny <el...@symas.com>
Committed: Tue Jul 28 11:44:43 2015 +0200
----------------------------------------------------------------------
mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina/blob/e81c0eb0/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java
----------------------------------------------------------------------
diff --git a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java
index 9135717..55cd926 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java
@@ -751,7 +751,7 @@ class SslHandler {
if (status == SSLEngineResult.Status.BUFFER_OVERFLOW) {
// We have to grow the target buffer, it's too small.
// Then we can call the unwrap method again
- appBuffer.capacity(appBuffer.capacity() << 1);
+ appBuffer.capacity(sslEngine.getSession().getApplicationBufferSize());
appBuffer.limit(appBuffer.capacity());
continue;
}