You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2007/09/17 01:55:40 UTC
svn commit: r576217 [4/7] - in /mina/trunk:
core/src/main/java/org/apache/mina/common/
core/src/main/java/org/apache/mina/filter/codec/
core/src/main/java/org/apache/mina/filter/codec/demux/
core/src/main/java/org/apache/mina/filter/codec/serialization...
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.statistic;
@@ -31,13 +31,13 @@
import org.apache.mina.common.WriteRequest;
/**
- * This class will measure, the time it takes for a
+ * This class will measure, the time it takes for a
* method in the {@link IoFilterAdapter} class to execute. The basic
* premise of the logic in this class is to get the current time
- * at the beginning of the method, call method on nextFilter, and
- * then get the current time again. An example of how to use
+ * at the beginning of the method, call method on nextFilter, and
+ * then get the current time again. An example of how to use
* the filter is:
- *
+ *
* <pre>
* ProfilerTimerFilter profiler = new ProfilerTimerFilter( ProfilerTimerFilter.MSG_RCV, ProfilerTimerUnit.MILLISECOND );
* chain.addFirst( "Profiler", profiler);
@@ -55,8 +55,8 @@
/**
* Creates a new instance of ProfilerFilter. This is the
- * default constructor and will print out timings for
- * messageReceived and messageSent and the time increment
+ * default constructor and will print out timings for
+ * messageReceived and messageSent and the time increment
* will be in milliseconds.
*/
public ProfilerTimerFilter() {
@@ -68,16 +68,16 @@
/**
* Creates a new instance of ProfilerFilter. An example
* of this call would be:
- *
+ *
* <code>
- * new ProfilerTimerFilter( EnumSet.of( IoEventType.MESSAGE_RECEIVED, IoEventType.MESSAGE_SENT ),
+ * new ProfilerTimerFilter( EnumSet.of( IoEventType.MESSAGE_RECEIVED, IoEventType.MESSAGE_SENT ),
* TimeUnit.MILLISECONDS );
* </code>
- *
+ *
* @param eventsToProfile
* A set of {@link IoEventType} representation of the methods to profile
* @param unit
- * Used to determine the level of precision you need in your timing.
+ * Used to determine the level of precision you need in your timing.
*/
public ProfilerTimerFilter(EnumSet<IoEventType> eventsToProfile,
TimeUnit unit) {
@@ -133,7 +133,7 @@
}
/**
- * Return the bitmask that is being used to display
+ * Return the bitmask that is being used to display
* timing information for this filter.
*
* @return
@@ -161,9 +161,10 @@
nextFilter.messageReceived(session, message);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.MESSAGE_RECEIVED))
+ if (getEventsToProfile().contains(IoEventType.MESSAGE_RECEIVED)) {
timerManager.get(IoEventType.MESSAGE_RECEIVED).addNewReading(
end - start);
+ }
}
@Override
@@ -173,9 +174,10 @@
nextFilter.messageSent(session, writeRequest);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.MESSAGE_SENT))
+ if (getEventsToProfile().contains(IoEventType.MESSAGE_SENT)) {
timerManager.get(IoEventType.MESSAGE_SENT).addNewReading(
end - start);
+ }
}
@Override
@@ -185,9 +187,10 @@
nextFilter.sessionClosed(session);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.SESSION_CLOSED))
+ if (getEventsToProfile().contains(IoEventType.SESSION_CLOSED)) {
timerManager.get(IoEventType.SESSION_CLOSED).addNewReading(
end - start);
+ }
}
@Override
@@ -197,9 +200,10 @@
nextFilter.sessionCreated(session);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.SESSION_CREATED))
+ if (getEventsToProfile().contains(IoEventType.SESSION_CREATED)) {
timerManager.get(IoEventType.SESSION_CREATED).addNewReading(
end - start);
+ }
}
@Override
@@ -209,9 +213,10 @@
nextFilter.sessionIdle(session, status);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.SESSION_IDLE))
+ if (getEventsToProfile().contains(IoEventType.SESSION_IDLE)) {
timerManager.get(IoEventType.SESSION_IDLE).addNewReading(
end - start);
+ }
}
@Override
@@ -221,9 +226,10 @@
nextFilter.sessionOpened(session);
long end = timeUnit.timeNow();
- if (getEventsToProfile().contains(IoEventType.SESSION_OPENED))
+ if (getEventsToProfile().contains(IoEventType.SESSION_OPENED)) {
timerManager.get(IoEventType.SESSION_OPENED).addNewReading(
end - start);
+ }
}
/**
@@ -265,7 +271,7 @@
* The total time this method has been executing
*
* @param type
- * The {@link IoEventType} that the user wants to get the total time this method has
+ * The {@link IoEventType} that the user wants to get the total time this method has
* been executing
* @return
* The total time for the method represented by the {@link IoEventType}
@@ -282,8 +288,8 @@
/**
* The minimum time the method represented by {@link IoEventType} has executed
*
- * @param type
- * The {@link IoEventType} that the user wants to get the minimum time this method has
+ * @param type
+ * The {@link IoEventType} that the user wants to get the minimum time this method has
* executed
* @return
* The minimum time this method has executed represented by the {@link IoEventType}
@@ -301,7 +307,7 @@
* The maximum time the method represented by {@link IoEventType} has executed
*
* @param type
- * The {@link IoEventType} that the user wants to get the maximum time this method has
+ * The {@link IoEventType} that the user wants to get the maximum time this method has
* executed
* @return
* The maximum time this method has executed represented by the {@link IoEventType}
@@ -344,7 +350,7 @@
}
/**
- * Add a new reading to this class. Total is updated
+ * Add a new reading to this class. Total is updated
* and calls is incremented
*
* @param newReading
@@ -420,28 +426,34 @@
enum ProfilerTimerUnit {
SECONDS {
+ @Override
public long timeNow() {
return System.currentTimeMillis() / 1000;
}
+ @Override
public String getDescription() {
return "seconds";
}
},
MILLISECONDS {
+ @Override
public long timeNow() {
return System.currentTimeMillis();
}
+ @Override
public String getDescription() {
return "milliseconds";
}
},
NANOSECONDS {
+ @Override
public long timeNow() {
return System.nanoTime();
}
+ @Override
public String getDescription() {
return "nanoseconds";
}
@@ -449,10 +461,10 @@
/*
* I was looking at possibly using the java.util.concurrent.TimeUnit
- * and I found this construct for writing enums. Here is what the
+ * and I found this construct for writing enums. Here is what the
* JDK developers say for why these methods below cannot be marked as
* abstract, but should act in an abstract way...
- *
+ *
* To maintain full signature compatibility with 1.5, and to improve the
* clarity of the generated javadoc (see 6287639: Abstract methods in
* enum classes should not be listed as abstract), method convert
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/stream/StreamWriteFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/stream/StreamWriteFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/stream/StreamWriteFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/stream/StreamWriteFilter.java Sun Sep 16 16:55:27 2007
@@ -29,6 +29,7 @@
import org.apache.mina.common.IoFilterAdapter;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.WriteRequest;
+import org.apache.mina.common.IoFilter.NextFilter;
/**
* Filter implementation which makes it possible to write {@link InputStream}
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilterBuilder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilterBuilder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilterBuilder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilterBuilder.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.traffic;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/util/ReferenceCountingIoFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/util/ReferenceCountingIoFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/util/ReferenceCountingIoFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/util/ReferenceCountingIoFilter.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.util;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.filter.util;
@@ -34,7 +34,7 @@
* an {@link IoSession} is newly created. Inserting this filter will make
* the pre-configured attributes available after this filter executes the
* <tt>sessionCreated</tt> event.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -43,7 +43,7 @@
/**
* Creates a new instance with no default attributes. You can set
- * the additional attributes by calling methods such as
+ * the additional attributes by calling methods such as
* {@link #setAttribute(String, Object)} and {@link #setAttributes(Map)}.
*/
public SessionAttributeInitializingFilter() {
@@ -51,7 +51,7 @@
/**
* Creates a new instance with the specified default attributes. You can
- * set the additional attributes by calling methods such as
+ * set the additional attributes by calling methods such as
* {@link #setAttribute(String, Object)} and {@link #setAttributes(Map)}.
*/
public SessionAttributeInitializingFilter(
@@ -61,7 +61,7 @@
/**
* Returns the value of user-defined attribute.
- *
+ *
* @param key the key of the attribute
* @return <tt>null</tt> if there is no attribute with the specified key
*/
@@ -71,7 +71,7 @@
/**
* Sets a user-defined attribute.
- *
+ *
* @param key the key of the attribute
* @param value the value of the attribute
* @return The old value of the attribute. <tt>null</tt> if it is new.
@@ -88,7 +88,7 @@
* Sets a user defined attribute without a value. This is useful when
* you just want to put a 'mark' attribute. Its value is set to
* {@link Boolean#TRUE}.
- *
+ *
* @param key the key of the attribute
* @return The old value of the attribute. <tt>null</tt> if it is new.
*/
@@ -98,7 +98,7 @@
/**
* Removes a user-defined attribute with the specified key.
- *
+ *
* @return The old value of the attribute. <tt>null</tt> if not found.
*/
public Object removeAttribute(String key) {
@@ -136,7 +136,7 @@
/**
* Puts all pre-configured attributes into the actual session attribute
- * map and forward the event to the next filter.
+ * map and forward the event to the next filter.
*/
@Override
public void sessionCreated(NextFilter nextFilter, IoSession session)
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/util/WrappingFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/util/WrappingFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/util/WrappingFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/util/WrappingFilter.java Sun Sep 16 16:55:27 2007
@@ -1,6 +1,10 @@
package org.apache.mina.filter.util;
-import org.apache.mina.common.*;
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoEventType;
+import org.apache.mina.common.IoFilterAdapter;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.WriteRequest;
/**
* Extend this class when you want to create a filter that
@@ -13,6 +17,7 @@
protected abstract void wrap(IoEventType eventType, IoSession session, Runnable action);
+ @Override
final public void sessionCreated(final NextFilter nextFilter, final IoSession session) throws Exception {
wrap(IoEventType.SESSION_CREATED, session, new Runnable() {
public void run() {
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.chain;
@@ -43,7 +43,7 @@
/**
* Creates a new instance which executes the specified
* {@link IoHandlerChain} on a <tt>messageReceived</tt> event.
- *
+ *
* @param chain an {@link IoHandlerChain} to execute
*/
public ChainedIoHandler(IoHandlerChain chain) {
@@ -64,7 +64,7 @@
/**
* Handles the specified <tt>messageReceived</tt> event with the
* {@link IoHandlerCommand} or {@link IoHandlerChain} you specified
- * in the constructor.
+ * in the constructor.
*/
@Override
public void messageReceived(IoSession session, Object message)
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerChain.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerChain.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerChain.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerChain.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.chain;
@@ -29,7 +29,7 @@
/**
* A chain of {@link IoHandlerCommand}s.
- *
+ *
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerCommand.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerCommand.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerCommand.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/chain/IoHandlerCommand.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.chain;
@@ -24,7 +24,7 @@
/**
* <p>A {@link IoHandlerCommand} encapsulates a unit of processing work to be
* performed, whose purpose is to examine and/or modify the state of a
- * transaction that is represented by custom attributes provided by
+ * transaction that is represented by custom attributes provided by
* {@link IoSession}. Individual {@link IoHandlerCommand}s can be assembled into
* a {@link IoHandlerChain}, which allows them to either complete the
* required processing or delegate further processing to the next
@@ -44,7 +44,7 @@
* public int getPropertyZ() { ... };
* public void setPropertyZ(int propertyZ) { ... };
* }
- *
+ *
* public class MyHandlderCommand implements IoHandlerCommand {
* public void execute( NextCommand next, IoSession session, Object message ) throws Exception {
* MyContext ctx = session.getAttribute( "mycontext" );
@@ -67,7 +67,7 @@
*
* @param next an indirect reference to the next {@link IoHandlerCommand} that
* provides a way to forward the request to the next {@link IoHandlerCommand}.
- * @param session the {@link IoSession} which is associated with
+ * @param session the {@link IoSession} which is associated with
* this request
* @param message the message object of this request
*
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.demux;
@@ -38,18 +38,18 @@
* {@link #removeMessageHandler(Class)}.
* </p>
* <p>
- * When <code>message</code> is received through a call to
- * {@link #messageReceived(IoSession, Object)} the class of the
- * <code>message</code> object will be used to find a {@link MessageHandler} for
- * that particular message type. If no {@link MessageHandler} instance can be
- * found for the immediate class (i.e. <code>message.getClass()</code>) the
- * interfaces implemented by the immediate class will be searched in depth-first
- * order. If no match can be found for any of the interfaces the search will be
- * repeated recursively for the superclass of the immediate class
+ * When <code>message</code> is received through a call to
+ * {@link #messageReceived(IoSession, Object)} the class of the
+ * <code>message</code> object will be used to find a {@link MessageHandler} for
+ * that particular message type. If no {@link MessageHandler} instance can be
+ * found for the immediate class (i.e. <code>message.getClass()</code>) the
+ * interfaces implemented by the immediate class will be searched in depth-first
+ * order. If no match can be found for any of the interfaces the search will be
+ * repeated recursively for the superclass of the immediate class
* (i.e. <code>message.getClass().getSuperclass()</code>).
* </p>
* <p>
- * Consider the following type hierarchy (<code>Cx</code> are classes while
+ * Consider the following type hierarchy (<code>Cx</code> are classes while
* <code>Ix</code> are interfaces):
* <pre>
* C3 - I7 - I9
@@ -61,18 +61,18 @@
* C1 - I1 - I2 - I4
* | |
* | I3
- * Object
+ * Object
* </pre>
- * When <code>message</code> is of type <code>C3</code> this hierarchy will be
+ * When <code>message</code> is of type <code>C3</code> this hierarchy will be
* searched in the following order:
* <code>C3, I7, I8, I9, I3, I4, C2, I5, I6, C1, I1, I2, I3, I4, Object</code>.
* </p>
* <p>
- * For efficiency searches will be cached. Calls to
+ * For efficiency searches will be cached. Calls to
* {@link #addMessageHandler(Class, MessageHandler)} and
* {@link #removeMessageHandler(Class)} clear this cache.
* </p>
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -92,7 +92,7 @@
/**
* Registers a {@link MessageHandler} that receives the messages of
* the specified <code>type</code>.
- *
+ *
* @return the old handler if there is already a registered handler for
* the specified <tt>type</tt>. <tt>null</tt> otherwise.
*/
@@ -106,7 +106,7 @@
/**
* Deregisters a {@link MessageHandler} that receives the messages of
* the specified <code>type</code>.
- *
+ *
* @return the removed handler if successfully removed. <tt>null</tt> otherwise.
*/
@SuppressWarnings("unchecked")
@@ -117,7 +117,7 @@
/**
* Returns the {@link MessageHandler} which is registered to process
- * the specified <code>type</code>.
+ * the specified <code>type</code>.
*/
@SuppressWarnings("unchecked")
public <E> MessageHandler<? super E> getMessageHandler(Class<E> type) {
@@ -196,7 +196,7 @@
if (handler == null) {
/*
- * No match in type's interfaces could be found. Search the
+ * No match in type's interfaces could be found. Search the
* superclass.
*/
@@ -208,7 +208,7 @@
/*
* Make sure the handler is added to the cache. By updating the cache
- * here all the types (superclasses and interfaces) in the path which
+ * here all the types (superclasses and interfaces) in the path which
* led to a match will be cached along with the immediate message type.
*/
if (handler != null) {
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/demux/MessageHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/demux/MessageHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/demux/MessageHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/demux/MessageHandler.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.demux;
@@ -26,7 +26,7 @@
* <code>messageReceived</code> events to. You have to register your
* handler with the type of message you want to get notified using
* {@link DemuxingIoHandler#addMessageHandler(Class, MessageHandler)}.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/demux/UnknownMessageTypeException.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/demux/UnknownMessageTypeException.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/demux/UnknownMessageTypeException.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/demux/UnknownMessageTypeException.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.demux;
@@ -24,8 +24,8 @@
* cannot find any {@link MessageHandler}s associated with the specific
* message type. You have to use
* {@link DemuxingIoHandler#addMessageHandler(Class, MessageHandler)}
- * to associate a message type and a message handler.
- *
+ * to associate a message type and a message handler.
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandler.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.multiton;
@@ -37,7 +37,7 @@
* Because events are passed to the session in order, it is possible to store
* conversational state as instance variables in this object.
* </p>
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -46,7 +46,7 @@
/**
* Invoked when the session is created. Initialize default socket parameters
* and user-defined attributes here.
- *
+ *
* @throws Exception
* @see IoHandler#sessionCreated(IoSession)
*/
@@ -55,7 +55,7 @@
/**
* Invoked when the connection is opened. This method is not invoked if the
* transport type is UDP.
- *
+ *
* @see IoHandler#sessionOpened(IoSession)
*/
void sessionOpened() throws Exception;
@@ -63,7 +63,7 @@
/**
* Invoked when the connection is closed. This method is not invoked if the
* transport type is UDP.
- *
+ *
* @see IoHandler#sessionClosed(IoSession)
*/
void sessionClosed() throws Exception;
@@ -71,7 +71,7 @@
/**
* Invoked when the connection is idle. Refer to {@link IdleStatus}. This
* method is not invoked if the transport type is UDP.
- *
+ *
* @param status the type of idleness
* @see IoHandler#sessionIdle(IoSession, IdleStatus)
*/
@@ -81,7 +81,7 @@
* Invoked when any exception is thrown by user {@link IoHandler}
* implementation or by MINA. If <code>cause</code> is instanceof
* {@link IOException}, MINA will close the connection automatically.
- *
+ *
* @param cause the caught exception
* @see IoHandler#exceptionCaught(IoSession, Throwable)
*/
@@ -90,7 +90,7 @@
/**
* Invoked when protocol message is received. Implement your protocol flow
* here.
- *
+ *
* @param message the received message
* @see IoHandler#messageReceived(IoSession, Object)
*/
@@ -99,7 +99,7 @@
/**
* Invoked when protocol message that user requested by
* {@link IoSession#write(Object)} is sent out actually.
- *
+ *
* @param message the sent message
* @see IoHandler#messageSent(IoSession, Object)
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerAdapter.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.multiton;
@@ -26,7 +26,7 @@
* Adapter class for implementors of the {@link SingleSessionIoHandler}
* interface. The session to which the handler is assigned is accessible
* through the {@link #getSession()} method.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.multiton;
@@ -28,7 +28,7 @@
* {@link SingleSessionIoHandler}s. A {@link SingleSessionIoHandlerFactory}
* is used to create a new {@link SingleSessionIoHandler} for each newly
* created session.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -51,7 +51,7 @@
* Creates a new instance that uses the passed in
* {@link SingleSessionIoHandlerFactory} to create new
* {@link SingleSessionIoHandler}s.
- *
+ *
* @param factory the factory for {@link SingleSessionIoHandler}s
*/
public SingleSessionIoHandlerDelegate(SingleSessionIoHandlerFactory factory) {
@@ -73,7 +73,7 @@
* Creates a new instance with the factory passed to the constructor of
* this class. The created handler is stored as a session
* attribute named {@link #HANDLER}.
- *
+ *
* @see org.apache.mina.common.IoHandler#sessionCreated(org.apache.mina.common.IoSession)
*/
public void sessionCreated(IoSession session) throws Exception {
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.multiton;
@@ -24,9 +24,9 @@
/**
* A factory that creates {@link SingleSessionIoHandler} to be used with one
* particular session.
- *
+ *
* @see SingleSessionIoHandler
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -34,7 +34,7 @@
/**
* Returns a {@link SingleSessionIoHandler} for the given session.
- *
+ *
* @param session the session for which a handler is requested
*/
SingleSessionIoHandler getHandler(IoSession session);
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionInputStream.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionInputStream.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionInputStream.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionInputStream.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.stream;
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionOutputStream.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionOutputStream.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionOutputStream.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/stream/IoSessionOutputStream.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.stream;
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/stream/StreamIoHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/stream/StreamIoHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/handler/stream/StreamIoHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/handler/stream/StreamIoHandler.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.handler.stream;
@@ -38,7 +38,7 @@
* {@link #processStreamIo(IoSession, InputStream, OutputStream)} to
* execute your stream I/O logic; <b>please note that you must forward
* the process request to other thread or thread pool.</b>
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/management/IoSessionStat.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/management/IoSessionStat.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/management/IoSessionStat.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/management/IoSessionStat.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.management;
@@ -23,13 +23,13 @@
/**
* The collected stats for a session. It's used by {@link StatCollector} to attach
- * throughput stats to an {@link IoSession}. You can accces a session stat using
+ * throughput stats to an {@link IoSession}. You can accces a session stat using
* {@link IoSession} getAttribute method :
* <pre>
* IoSession session = ...
* IoSessionStat stat = session.getAttribute( StatCollector.KEY );
* </pre>
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -54,7 +54,7 @@
long lastPollingTime = System.currentTimeMillis();
/**
- * Bytes read per second
+ * Bytes read per second
* @return bytes per second
*/
public float getByteReadThroughput() {
@@ -62,7 +62,7 @@
}
/**
- * Bytes written per second
+ * Bytes written per second
* @return bytes per second
*/
public float getByteWrittenThroughput() {
@@ -70,7 +70,7 @@
}
/**
- * Messages read per second
+ * Messages read per second
* @return messages per second
*/
public float getMessageReadThroughput() {
@@ -78,7 +78,7 @@
}
/**
- * Messages written per second
+ * Messages written per second
* @return messages per second
*/
public float getMessageWrittenThroughput() {
@@ -86,28 +86,28 @@
}
/**
- * used for the StatCollector, last polling value
+ * used for the StatCollector, last polling value
*/
long getLastByteRead() {
return lastByteRead;
}
/**
- * used for the StatCollector, last polling value
+ * used for the StatCollector, last polling value
*/
long getLastByteWrite() {
return lastByteWrite;
}
/**
- * used for the StatCollector, last polling value
+ * used for the StatCollector, last polling value
*/
long getLastMessageRead() {
return lastMessageRead;
}
/**
- * used for the StatCollector, last polling value
+ * used for the StatCollector, last polling value
*/
long getLastMessageWrite() {
return lastMessageWrite;
Modified: mina/trunk/core/src/main/java/org/apache/mina/management/StatCollector.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/management/StatCollector.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/management/StatCollector.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/management/StatCollector.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.management;
@@ -31,17 +31,17 @@
* Collects statistics of an {@link IoService}. It's polling all the sessions of a given
* IoService. It's attaching a {@link IoSessionStat} object to all the sessions polled
* and filling the throughput values.
- *
+ *
* Usage :
* <pre>
* IoService service = ...
* StatCollector collector = new StatCollector( service );
* collector.start();
* </pre>
- *
- * By default the {@link StatCollector} is polling the sessions every 5 seconds. You can
+ *
+ * By default the {@link StatCollector} is polling the sessions every 5 seconds. You can
* give a different polling time using a second constructor.
- *
+ *
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
@@ -68,7 +68,7 @@
private Queue<IoSession> polledSessions;
- // resume of session stats, for simplifying acces to the statistics
+ // resume of session stats, for simplifying acces to the statistics
private final AtomicLong totalProcessedSessions = new AtomicLong();
private float msgWrittenThroughput = 0f;
@@ -96,7 +96,7 @@
};
/**
- * Create a stat collector for the given service with a default polling time of 5 seconds.
+ * Create a stat collector for the given service with a default polling time of 5 seconds.
* @param service the IoService to inspect
*/
public StatCollector(IoService service) {
@@ -144,7 +144,7 @@
/**
* Stop collecting stats. all the {@link IoSessionStat} object will be removed of the
- * polled session attachements.
+ * polled session attachements.
*/
public void stop() {
synchronized (this) {
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractDatagramSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractDatagramSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractDatagramSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractDatagramSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -32,6 +32,7 @@
protected AbstractDatagramSessionConfig() {
}
+ @Override
protected void doSetAll(IoSessionConfig config) {
if (config instanceof DatagramSessionConfig) {
DatagramSessionConfig cfg = (DatagramSessionConfig) config;
@@ -39,7 +40,7 @@
setReceiveBufferSize(cfg.getReceiveBufferSize());
setReuseAddress(cfg.isReuseAddress());
setSendBufferSize(cfg.getSendBufferSize());
-
+
if (getTrafficClass() != cfg.getTrafficClass()) {
setTrafficClass(cfg.getTrafficClass());
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractSocketSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractSocketSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractSocketSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/AbstractSocketSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -32,6 +32,7 @@
protected AbstractSocketSessionConfig() {
}
+ @Override
protected final void doSetAll(IoSessionConfig config) {
if (config instanceof SocketSessionConfig) {
SocketSessionConfig cfg = (SocketSessionConfig) config;
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java Sun Sep 16 16:55:27 2007
@@ -65,7 +65,7 @@
private final int id = nextId++;
private final Selector selector;
-
+
private final IoProcessor processor = new DatagramAcceptorProcessor();
private DatagramChannel channel;
@@ -252,11 +252,11 @@
protected IoServiceListenerSupport getListeners() {
return super.getListeners();
}
-
+
IoProcessor getProcessor() {
return processor;
}
-
+
private class DatagramAcceptorProcessor implements IoProcessor {
public void add(IoSession session) {
@@ -387,7 +387,7 @@
if (session == null) {
break;
}
-
+
session.setScheduledForFlush(false);
try {
@@ -411,7 +411,7 @@
if (!key.isValid()) {
return false;
}
- key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
+ key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
DatagramChannel ch = session.getChannel();
Queue<WriteRequest> writeRequestQueue = session.getWriteRequestQueue();
@@ -453,7 +453,7 @@
key.interestOps(key.interestOps() | SelectionKey.OP_WRITE);
return false;
} else {
- key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
+ key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE);
// pop and fire event
synchronized (writeRequestQueue) {
@@ -469,7 +469,7 @@
} finally {
session.increaseWrittenBytes(writtenBytes);
}
-
+
return true;
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramConnector.java Sun Sep 16 16:55:27 2007
@@ -60,7 +60,7 @@
*/
public DatagramConnector(Executor executor) {
super(new DefaultDatagramSessionConfig());
-
+
processor = new NIOProcessor("DatagramConnector-" + id, executor);
}
@@ -96,13 +96,13 @@
ch.socket().bind(localAddress);
}
ch.connect(remoteAddress);
-
+
session = new DatagramSessionImpl(this, ch, getHandler());
getFilterChainBuilder().buildFilterChain(session.getFilterChain());
ConnectFuture future = new DefaultConnectFuture();
// DefaultIoFilterChain will notify the connect future.
session.setAttribute(DefaultIoFilterChain.CONNECT_FUTURE, future);
-
+
processor.add(session);
initialized = true;
return future;
@@ -119,7 +119,7 @@
}
}
}
-
+
IoProcessor getProcessor() {
return processor;
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionImpl.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionImpl.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionImpl.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DatagramSessionImpl.java Sun Sep 16 16:55:27 2007
@@ -108,7 +108,8 @@
public IoService getService() {
return service;
}
-
+
+ @Override
protected IoProcessor getProcessor() {
if (service instanceof DatagramAcceptor) {
return ((DatagramAcceptor) service).getProcessor();
@@ -125,14 +126,17 @@
return filterChain;
}
+ @Override
DatagramChannel getChannel() {
return ch;
}
+ @Override
SelectionKey getSelectionKey() {
return key;
}
+ @Override
void setSelectionKey(SelectionKey key) {
this.key = key;
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultDatagramSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -26,7 +26,7 @@
/**
* A default implementation of {@link DatagramSessionConfig}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev: 439913 $, $Date: 2006-09-04 05:12:43 +0200 (mån, 04 sep 2006) $
*/
@@ -128,7 +128,7 @@
*/
DefaultDatagramSessionConfig() {
}
-
+
/**
* @see DatagramSocket#getBroadcast()
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/DefaultSocketSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOProcessor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOProcessor.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOProcessor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOProcessor.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -37,7 +37,7 @@
import org.apache.mina.common.RuntimeIOException;
/**
- *
+ *
* @author Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -47,14 +47,14 @@
NIOProcessor(String threadName, Executor executor) {
super(threadName, executor);
-
+
try {
this.selector = Selector.open();
} catch (IOException e) {
throw new RuntimeIOException("Failed to open a selector.", e);
}
}
-
+
@Override
protected void finalize() throws Throwable {
super.finalize();
@@ -80,10 +80,11 @@
return new IoSessionIterator(selector.keys());
}
+ @Override
protected Iterator<AbstractIoSession> selectedSessions() throws Exception {
return new IoSessionIterator(selector.selectedKeys());
}
-
+
@Override
protected void doAdd(IoSession session) throws Exception {
SelectableChannel ch = (SelectableChannel) getChannel(session);
@@ -92,7 +93,7 @@
session,
ch.register(selector, SelectionKey.OP_READ, session));
}
-
+
@Override
protected void doRemove(IoSession session) throws Exception {
ByteChannel ch = getChannel(session);
@@ -107,7 +108,7 @@
if (key == null) {
return SessionState.PREPARING;
}
-
+
return key.isValid()? SessionState.OPEN : SessionState.CLOSED;
}
@@ -130,25 +131,25 @@
protected int read(IoSession session, ByteBuffer buf) throws Exception {
return getChannel(session).read(buf.buf());
}
-
+
@Override
protected int write(IoSession session, ByteBuffer buf) throws Exception {
return getChannel(session).write(buf.buf());
}
-
+
@Override
protected long transferFile(IoSession session, FileRegion region) throws Exception {
return region.getFileChannel().transferTo(region.getPosition(), region.getCount(), getChannel(session));
}
-
+
private ByteChannel getChannel(IoSession session) {
return ((NIOSession) session).getChannel();
}
-
+
private SelectionKey getSelectionKey(IoSession session) {
return ((NIOSession) session).getSelectionKey();
}
-
+
private void setSelectionKey(IoSession session, SelectionKey key) {
((NIOSession) session).setSelectionKey(key);
}
@@ -162,12 +163,12 @@
public boolean hasNext() {
return i.hasNext();
}
-
+
public AbstractIoSession next() {
SelectionKey key = i.next();
return (AbstractIoSession) key.attachment();
}
-
+
public void remove() {
i.remove();
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOSession.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOSession.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOSession.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NIOSession.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -25,7 +25,7 @@
import org.apache.mina.common.AbstractIoSession;
/**
- *
+ *
* @author Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.socket.nio;
@@ -93,7 +93,7 @@
/**
* Please note that enabling <tt>SO_LINGER</tt> in Java NIO can result
* in platform-dependent behavior and unexpected blocking of I/O thread.
- *
+ *
* @see Socket#getSoLinger()
* @see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179351">Sun Bug Database</a>
*/
@@ -102,9 +102,9 @@
/**
* Please note that enabling <tt>SO_LINGER</tt> in Java NIO can result
* in platform-dependent behavior and unexpected blocking of I/O thread.
- *
+ *
* @param soLinger Please specify a negative value to disable <tt>SO_LINGER</tt>.
- *
+ *
* @see Socket#setSoLinger(boolean, int)
* @see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6179351">Sun Bug Database</a>
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionImpl.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionImpl.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionImpl.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketSessionImpl.java Sun Sep 16 16:55:27 2007
@@ -83,6 +83,7 @@
return config;
}
+ @Override
protected IoProcessor getProcessor() {
return processor;
}
@@ -95,14 +96,17 @@
return METADATA;
}
+ @Override
SocketChannel getChannel() {
return ch;
}
+ @Override
SelectionKey getSelectionKey() {
return key;
}
+ @Override
void setSelectionKey(SelectionKey key) {
this.key = key;
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
@@ -24,7 +24,7 @@
/**
* A default implementation of {@link VmPipeSessionConfig}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipe.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipe.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipe.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipe.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
@@ -32,7 +32,7 @@
/**
* Binds the specified {@link IoHandler} to the specified
* {@link VmPipeAddress}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAddress.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAddress.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAddress.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAddress.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
@@ -23,7 +23,7 @@
/**
* A {@link SocketAddress} which represents in-VM pipe port number.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -76,7 +76,7 @@
if (port >= 0) {
return "vm:server:" + port;
} else {
- return "vm:client:" + (-port);
+ return "vm:client:" + -port;
}
}
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeFilterChain.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeFilterChain.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeFilterChain.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeFilterChain.java Sun Sep 16 16:55:27 2007
@@ -49,7 +49,7 @@
VmPipeFilterChain(AbstractIoSession session) {
super(session);
}
-
+
IoProcessor getProcessor() {
return processor;
}
@@ -170,7 +170,7 @@
public void fireMessageReceived(IoSession session, Object message) {
pushEvent(new IoEvent(IoEventType.MESSAGE_RECEIVED, session, message));
}
-
+
private class VmPipeIoProcessor implements IoProcessor {
public void flush(IoSession session, WriteRequest writeRequest) {
VmPipeSessionImpl s = (VmPipeSessionImpl) session;
@@ -196,10 +196,10 @@
rb.reset();
messageCopy = wb;
}
-
+
s.increaseWrittenBytes(byteCount);
s.increaseWrittenMessages();
-
+
s.getRemoteSession().getFilterChain().fireMessageReceived(
s.getRemoteSession(), messageCopy);
s.getFilterChain().fireMessageSent(s, req);
@@ -246,7 +246,7 @@
VmPipeFilterChain.this.fireMessageReceived(s, aData);
}
}
-
+
if (s.getTrafficMask().isWritable()) {
flush(s, null); // The second parameter is unused.
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSession.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionConfig.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionConfig.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionConfig.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionConfig.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.transport.vmpipe;
@@ -23,7 +23,7 @@
/**
* An {@link IoSessionConfig} for vmpipe transport type.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionImpl.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionImpl.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionImpl.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeSessionImpl.java Sun Sep 16 16:55:27 2007
@@ -107,7 +107,8 @@
public IoService getService() {
return service;
}
-
+
+ @Override
protected IoProcessor getProcessor() {
return filterChain.getProcessor();
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/util/AvailablePortFinder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/util/AvailablePortFinder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/util/AvailablePortFinder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/util/AvailablePortFinder.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.util;
@@ -77,7 +77,7 @@
* @throws NoSuchElementException if there are no ports available
*/
public static int getNextAvailable(int fromPort) {
- if ((fromPort < MIN_PORT_NUMBER) || (fromPort > MAX_PORT_NUMBER)) {
+ if (fromPort < MIN_PORT_NUMBER || fromPort > MAX_PORT_NUMBER) {
throw new IllegalArgumentException("Invalid start port: "
+ fromPort);
}
@@ -98,7 +98,7 @@
* @param port the port to check for availability
*/
public static boolean available(int port) {
- if ((port < MIN_PORT_NUMBER) || (port > MAX_PORT_NUMBER)) {
+ if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) {
throw new IllegalArgumentException("Invalid start port: " + port);
}
@@ -137,8 +137,8 @@
* <code>fromPort</code> if greater than <code>toPort</code>.
*/
public static Set<Integer> getAvailablePorts(int fromPort, int toPort) {
- if ((fromPort < MIN_PORT_NUMBER) || (toPort > MAX_PORT_NUMBER)
- || (fromPort > toPort)) {
+ if (fromPort < MIN_PORT_NUMBER || toPort > MAX_PORT_NUMBER
+ || fromPort > toPort) {
throw new IllegalArgumentException("Invalid port range: "
+ fromPort + " ~ " + toPort);
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/util/ConcurrentHashSet.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/util/ConcurrentHashSet.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/util/ConcurrentHashSet.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/util/ConcurrentHashSet.java Sun Sep 16 16:55:27 2007
@@ -6,16 +6,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
- *
+ * under the License.
+ *
*/
package org.apache.mina.util;
@@ -42,6 +42,6 @@
@Override
public boolean add(E o) {
Boolean answer = ((ConcurrentMap<E, Boolean>) map).putIfAbsent(o, Boolean.TRUE);
- return (answer == null);
+ return answer == null;
}
}