Skip to content

Commit

Permalink
[maven-release-plugin] copy for tag 1.1.1
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/mina/tags/1.1.1@557169 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
trustin committed Jul 18, 2007
1 parent 599e7a6 commit ace0465
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 39 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-core</artifactId>
<name>Apache MINA Core API</name>
Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-example</artifactId>
<name>Apache MINA Examples</name>
Expand Down
2 changes: 1 addition & 1 deletion filter-codec-netty/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-filter-codec-netty</artifactId>
<name>Apache MINA Netty Codec Filter</name>
Expand Down
2 changes: 1 addition & 1 deletion filter-compression/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-filter-compression</artifactId>
<name>Apache MINA Stream Compression Filter</name>
Expand Down
2 changes: 1 addition & 1 deletion filter-ssl/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-filter-ssl</artifactId>
<name>Apache MINA SSL Filter</name>
Expand Down
30 changes: 15 additions & 15 deletions filter-ssl/src/main/java/org/apache/mina/filter/SSLFilter.java
Expand Up @@ -189,7 +189,7 @@ public boolean startSSL(IoSession session) throws SSLException {
}
}

handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
return started;
}

Expand Down Expand Up @@ -226,7 +226,7 @@ public WriteFuture stopSSL(IoSession session) throws SSLException {
future = initiateClosure(nextFilter, session);
}

handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();

return future;
}
Expand Down Expand Up @@ -339,7 +339,7 @@ public void onPostAdd(IoFilterChain parent, String name,
synchronized (handler) {
handler.handshake(nextFilter);
}
handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
}

public void onPreRemove(IoFilterChain parent, String name,
Expand Down Expand Up @@ -367,7 +367,7 @@ public void sessionClosed(NextFilter nextFilter, IoSession session)
handler.destroy();
}

handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
} finally {
// notify closed session
nextFilter.sessionClosed(session);
Expand All @@ -379,7 +379,7 @@ public void messageReceived(NextFilter nextFilter, IoSession session,
SSLHandler handler = getSSLSessionHandler(session);
synchronized (handler) {
if (!isSSLStarted(session) && handler.isInboundDone()) {
handler.schedulePostHandshakeMessage(nextFilter, message);
handler.scheduleMessageReceived(nextFilter, message);
} else {
ByteBuffer buf = (ByteBuffer) message;
if (SessionLog.isDebugEnabled(session)) {
Expand Down Expand Up @@ -407,7 +407,7 @@ public void messageReceived(NextFilter nextFilter, IoSession session,
}

if (buf.hasRemaining()) {
handler.schedulePostHandshakeMessage(nextFilter,
handler.scheduleMessageReceived(nextFilter,
buf);
}
}
Expand All @@ -424,7 +424,7 @@ public void messageReceived(NextFilter nextFilter, IoSession session,
}
}

handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
}

public void messageSent(NextFilter nextFilter, IoSession session,
Expand All @@ -444,14 +444,14 @@ public void filterWrite(NextFilter nextFilter, IoSession session,
SSLHandler handler = getSSLSessionHandler(session);
synchronized (handler) {
if (!isSSLStarted(session)) {
handler.schedulePostHandshakeWriteRequest(nextFilter,
handler.scheduleFilterWrite(nextFilter,
writeRequest);
}
// Don't encrypt the data if encryption is disabled.
else if (session.containsAttribute(DISABLE_ENCRYPTION_ONCE)) {
// Remove the marker attribute because it is temporary.
session.removeAttribute(DISABLE_ENCRYPTION_ONCE);
handler.schedulePostHandshakeWriteRequest(nextFilter,
handler.scheduleFilterWrite(nextFilter,
writeRequest);
} else {
// Otherwise, encrypt the buffer.
Expand All @@ -467,7 +467,7 @@ else if (session.containsAttribute(DISABLE_ENCRYPTION_ONCE)) {
SessionLog.debug(session, " already encrypted: "
+ buf);
}
handler.schedulePostHandshakeWriteRequest(nextFilter,
handler.scheduleFilterWrite(nextFilter,
writeRequest);
} else if (handler.isInitialHandshakeComplete()) {
// SSL encrypt
Expand All @@ -485,7 +485,7 @@ else if (session.containsAttribute(DISABLE_ENCRYPTION_ONCE)) {
SessionLog.debug(session, " encrypted buf: "
+ encryptedBuffer);
}
handler.schedulePostHandshakeWriteRequest(nextFilter,
handler.scheduleFilterWrite(nextFilter,
new WriteRequest(encryptedBuffer, writeRequest
.getFuture()));
} else {
Expand All @@ -509,7 +509,7 @@ else if (session.containsAttribute(DISABLE_ENCRYPTION_ONCE)) {
}

if (needsFlush) {
handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
}
}

Expand All @@ -531,7 +531,7 @@ public void filterClose(final NextFilter nextFilter, final IoSession session)
}
}

handler.flushPostHandshakeEvents();
handler.flushScheduledEvents();
} finally {
if (future == null) {
nextFilter.filterClose(session);
Expand Down Expand Up @@ -561,7 +561,7 @@ private WriteFuture initiateClosure(NextFilter nextFilter, IoSession session)
}

if (session.containsAttribute(USE_NOTIFICATION)) {
handler.schedulePostHandshakeMessage(nextFilter, SESSION_UNSECURED);
handler.scheduleMessageReceived(nextFilter, SESSION_UNSECURED);
}

return future;
Expand Down Expand Up @@ -600,7 +600,7 @@ private void handleAppDataRead(NextFilter nextFilter, SSLHandler handler) {
+ readBuffer.getHexDump() + ')');
}

handler.schedulePostHandshakeMessage(nextFilter, readBuffer);
handler.scheduleMessageReceived(nextFilter, readBuffer);
}

private SSLHandler getSSLSessionHandler(IoSession session) {
Expand Down
Expand Up @@ -59,7 +59,9 @@ public class SSLHandler {

private final Queue<Event> preHandshakeEventQueue = new LinkedList<Event>();

private final Queue<Event> postHandshakeEventQueue = new ConcurrentLinkedQueue<Event>();
private final Queue<Event> filterWriteEventQueue = new ConcurrentLinkedQueue<Event>();

private final Queue<Event> messageReceivedEventQueue = new ConcurrentLinkedQueue<Event>();

private SSLEngine sslEngine;

Expand Down Expand Up @@ -239,33 +241,37 @@ public void flushPreHandshakeEvents() throws SSLException {
}
}

public void schedulePostHandshakeWriteRequest(NextFilter nextFilter,
public void scheduleFilterWrite(NextFilter nextFilter,
WriteRequest writeRequest) {
postHandshakeEventQueue.offer(new Event(EventType.FILTER_WRITE,
filterWriteEventQueue.offer(new Event(EventType.FILTER_WRITE,
nextFilter, writeRequest));
}

public void schedulePostHandshakeMessage(NextFilter nextFilter,
public void scheduleMessageReceived(NextFilter nextFilter,
Object message) {
postHandshakeEventQueue.offer(new Event(EventType.RECEIVED, nextFilter,
messageReceivedEventQueue.offer(new Event(EventType.RECEIVED, nextFilter,
message));
}

public void flushPostHandshakeEvents() {
public void flushScheduledEvents() {
// Fire events only when no lock is hold for this handler.
if (Thread.holdsLock(this)) {
return;
}

Event e;

while ((e = postHandshakeEventQueue.poll()) != null) {
if (EventType.RECEIVED == e.type) {
e.nextFilter.messageReceived(session, e.data);
} else {
// We need synchronization here inevitably because filterWrite can be
// called simultaneously and cause 'bad record MAC' integrity error.
synchronized (this) {
while ((e = filterWriteEventQueue.poll()) != null) {
e.nextFilter.filterWrite(session, (WriteRequest) e.data);
}
}

while ((e = messageReceivedEventQueue.poll()) != null) {
e.nextFilter.messageReceived(session, e.data);
}
}

/**
Expand Down Expand Up @@ -463,7 +469,7 @@ public void handshake(NextFilter nextFilter) throws SSLException {
}
initialHandshakeComplete = true;
if (session.containsAttribute(SSLFilter.USE_NOTIFICATION)) {
schedulePostHandshakeMessage(nextFilter,
scheduleMessageReceived(nextFilter,
SSLFilter.SESSION_SECURED);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion integration-jmx/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-integration-jmx</artifactId>
<name>Apache MINA JMX integration</name>
Expand Down
2 changes: 1 addition & 1 deletion integration-spring/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.mina</groupId>
<artifactId>build</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<artifactId>mina-integration-spring</artifactId>
<name>Apache MINA Spring Integration</name>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Expand Up @@ -11,7 +11,7 @@
<url>http://mina.apace.org/</url>
</organization>
<groupId>org.apache.mina</groupId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
<artifactId>build</artifactId>
<name>Apache MINA Root Build POM</name>
<packaging>pom</packaging>
Expand All @@ -25,9 +25,9 @@
</issueManagement>

<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/mina/branches/1.1</connection>
<url>http://svn.apache.org/viewvc/mina/branches/1.1/</url>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/mina/branches/1.1</developerConnection>
<connection>scm:svn:http://svn.apache.org/repos/asf/mina/tags/1.1.1</connection>
<url>http://svn.apache.org/viewvc/mina/tags/1.1.1</url>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/mina/tags/1.1.1</developerConnection>
</scm>

<distributionManagement>
Expand Down

0 comments on commit ace0465

Please sign in to comment.