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 [3/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/codec/ProtocolDecoderAdapter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderAdapter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderAdapter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderAdapter.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.codec;
@@ -25,7 +25,7 @@
* An abstract {@link ProtocolDecoder} implementation for those who don't need
* {@link ProtocolDecoder#finishDecode(IoSession, ProtocolDecoderOutput)} nor
* {@link ProtocolDecoder#dispose(IoSession)} method.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderException.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderException.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderException.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderException.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.codec;
@@ -25,7 +25,7 @@
* An exception that is thrown when {@link ProtocolDecoder}
* cannot understand or failed to validate the specified {@link ByteBuffer}
* content.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -74,7 +74,7 @@
}
if (hexdump != null) {
- return message + ((message.length() > 0) ? " " : "") + "(Hexdump: "
+ return message + (message.length() > 0 ? " " : "") + "(Hexdump: "
+ hexdump + ')';
} else {
return message;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderOutput.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderOutput.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderOutput.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolDecoderOutput.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.codec;
@@ -23,7 +23,7 @@
* Callback for {@link ProtocolDecoder} to generate decoded messages.
* {@link ProtocolDecoder} must call {@link #write(Object)} for each decoded
* messages.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -32,7 +32,7 @@
* Callback for {@link ProtocolDecoder} to generate decoded messages.
* {@link ProtocolDecoder} must call {@link #write(Object)} for each
* decoded messages.
- *
+ *
* @param message the decoded message
*/
void write(Object message);
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoder.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.codec;
@@ -32,8 +32,8 @@
* <p>
* Please refer to
* <a href="../../../../../xref-examples/org/apache/mina/examples/reverser/TextLineEncoder.html"><code>TextLineEncoder</code></a>
- * example.
- *
+ * example.
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -45,7 +45,7 @@
* method with message which is popped from the session write queue, and then
* the encoder implementation puts encoded {@link ByteBuffer}s into
* {@link ProtocolEncoderOutput}.
- *
+ *
* @throws Exception if the message violated protocol specification
*/
void encode(IoSession session, Object message, ProtocolEncoderOutput out)
@@ -53,7 +53,7 @@
/**
* Releases all resources related with this encoder.
- *
+ *
* @throws Exception if failed to dispose all resources
*/
void dispose(IoSession session) throws Exception;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderAdapter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderAdapter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderAdapter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderAdapter.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.codec;
@@ -24,7 +24,7 @@
/**
* An abstract {@link ProtocolEncoder} implementation for those who don't have any
* resources to dispose.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderException.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderException.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderException.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderException.java Sun Sep 16 16:55:27 2007
@@ -6,23 +6,23 @@
* 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.codec;
/**
* An exception that is thrown when {@link ProtocolEncoder}
* cannot understand or failed to validate the specified message object.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderOutput.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderOutput.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderOutput.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolEncoderOutput.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.codec;
@@ -26,7 +26,7 @@
* Callback for {@link ProtocolEncoder} to generate encoded {@link ByteBuffer}s.
* {@link ProtocolEncoder} must call {@link #write(ByteBuffer)} for each encoded
* message.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -35,7 +35,7 @@
* Callback for {@link ProtocolEncoder} to generate encoded
* {@link ByteBuffer}s. {@link ProtocolEncoder} must call
* {@link #write(ByteBuffer)} for each encoded message.
- *
+ *
* @param buf the buffer which contains encoded data
*/
void write(ByteBuffer buf);
@@ -53,7 +53,7 @@
* the session. This operation is asynchronous; please wait for
* the returned {@link WriteFuture} if you want to wait for
* the buffers flushed.
- *
+ *
* @return <tt>null</tt> if there is nothing to flush at all.
*/
WriteFuture flush();
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolDecoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolDecoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolDecoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolDecoder.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.codec;
@@ -30,7 +30,7 @@
* on a per-session basis by {@link ProtocolCodecFilter}. Please use this
* decorator only when you need to synchronize on a per-decoder basis, which
* is not common.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolEncoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolEncoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolEncoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/SynchronizedProtocolEncoder.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.codec;
@@ -28,7 +28,7 @@
* environment. Please use this decorator only when you need to synchronize
* on a per-encoder basis instead of on a per-session basis, which is not
* common.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/DemuxingProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/DemuxingProtocolCodecFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/DemuxingProtocolCodecFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/DemuxingProtocolCodecFactory.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.codec.demux;
@@ -41,8 +41,8 @@
* {@link MessageEncoder}s and {@link MessageDecoder}s.
* {@link ProtocolEncoder} and {@link ProtocolDecoder} this factory
* returns demultiplex incoming messages and buffers to
- * appropriate {@link MessageEncoder}s and {@link MessageDecoder}s.
- *
+ * appropriate {@link MessageEncoder}s and {@link MessageDecoder}s.
+ *
* <h2>Disposing resources acquired by {@link MessageEncoder} and {@link MessageDecoder}</h2>
* <p>
* Make your {@link MessageEncoder} and {@link MessageDecoder} to put all
@@ -53,10 +53,10 @@
* We didn't provide any <tt>dispose</tt> method for {@link MessageEncoder} and {@link MessageDecoder}
* because they can give you a big performance penalty in case you have a lot of
* message types to handle.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see MessageEncoder
* @see MessageDecoder
*/
@@ -144,13 +144,13 @@
* Implement this method to release all resources acquired to perform
* encoding and decoding messages for the specified <tt>session</tt>.
* By default, this method does nothing.
- *
+ *
* @param session the session that requires resource deallocation now
*/
protected void disposeCodecResources(IoSession session) {
// Do nothing by default; let users implement it as they want.
- // This statement is just to avoid compiler warning. Please ignore.
+ // This statement is just to avoid compiler warning. Please ignore.
session.getService();
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoder.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.codec.demux;
@@ -25,10 +25,10 @@
/**
* Decodes specific messages.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see DemuxingProtocolCodecFactory
* @see MessageDecoderFactory
*/
@@ -56,7 +56,7 @@
/**
* Checks the specified buffer is decodable by this decoder.
- *
+ *
* @return {@link #OK} if this decoder can decode the specified buffer.
* {@link #NOT_OK} if this decoder cannot decode the specified buffer.
* {@link #NEED_DATA} if more data is required to determine if the
@@ -70,12 +70,12 @@
* MINA invokes {@link #decode(IoSession, ByteBuffer, ProtocolDecoderOutput)}
* method with read data, and then the decoder implementation puts decoded
* messages into {@link ProtocolDecoderOutput}.
- *
+ *
* @return {@link #OK} if you finished decoding messages successfully.
* {@link #NEED_DATA} if you need more data to finish decoding current message.
* {@link #NOT_OK} if you cannot decode current message due to protocol specification violation.
- *
- * @throws Exception if the read data violated protocol specification
+ *
+ * @throws Exception if the read data violated protocol specification
*/
MessageDecoderResult decode(IoSession session, ByteBuffer in,
ProtocolDecoderOutput out) throws Exception;
@@ -87,7 +87,7 @@
* header. Implement this method to process the remaining data that
* {@link #decode(IoSession, ByteBuffer, ProtocolDecoderOutput)} method didn't process
* completely.
- *
+ *
* @throws Exception if the read data violated protocol specification
*/
void finishDecode(IoSession session, ProtocolDecoderOutput out)
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderAdapter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderAdapter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderAdapter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderAdapter.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.codec.demux;
@@ -26,7 +26,7 @@
* An abstract {@link MessageDecoder} implementation for those who don't need to
* implement {@link MessageDecoder#finishDecode(IoSession, ProtocolDecoderOutput)}
* method.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
*/
public abstract class MessageDecoderAdapter implements MessageDecoder {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderFactory.java Sun Sep 16 16:55:27 2007
@@ -6,25 +6,25 @@
* 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.codec.demux;
/**
* A factory that creates a new instance of {@link MessageDecoder}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see DemuxingProtocolCodecFactory
*/
public interface MessageDecoderFactory {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderResult.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderResult.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderResult.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageDecoderResult.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.codec.demux;
@@ -25,10 +25,10 @@
/**
* Represents results from {@link MessageDecoder}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see MessageDecoder
*/
public class MessageDecoderResult {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoder.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.codec.demux;
@@ -27,10 +27,10 @@
/**
* Encodes messages of specific types specified by {@link #getMessageTypes()}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see DemuxingProtocolCodecFactory
* @see MessageEncoderFactory
*/
@@ -46,7 +46,7 @@
* method with message which is popped from the session write queue, and then
* the encoder implementation puts encoded {@link ByteBuffer}s into
* {@link ProtocolEncoderOutput}.
- *
+ *
* @throws Exception if the message violated protocol specification
*/
void encode(IoSession session, T message, ProtocolEncoderOutput out)
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoderFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoderFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoderFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/demux/MessageEncoderFactory.java Sun Sep 16 16:55:27 2007
@@ -6,25 +6,25 @@
* 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.codec.demux;
/**
* A factory that creates a new instance of {@link MessageEncoder}.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
- *
+ *
* @see DemuxingProtocolCodecFactory
*/
public interface MessageEncoderFactory<T> {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.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.codec.serialization;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.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.codec.serialization;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationEncoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationEncoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationEncoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationEncoder.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.codec.serialization;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationInputStream.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationInputStream.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationInputStream.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationInputStream.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.codec.serialization;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationOutputStream.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationOutputStream.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationOutputStream.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationOutputStream.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.codec.serialization;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/LineDelimiter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/LineDelimiter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/LineDelimiter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/LineDelimiter.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.codec.textline;
@@ -46,7 +46,7 @@
* A special line delimiter which is used for auto-detection of
* EOL in {@link TextLineDecoder}. If this delimiter is used,
* {@link TextLineDecoder} will consider both <tt>'\r'</tt> and
- * <tt>'\n'</tt> as a delimiter.
+ * <tt>'\n'</tt> as a delimiter.
*/
public static final LineDelimiter AUTO = new LineDelimiter("");
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineCodecFactory.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.codec.textline;
@@ -53,10 +53,10 @@
/**
- * Creates a new instance with the specified {@link Charset}. The
- * encoder uses a UNIX {@link LineDelimeter} and the decoder uses
+ * Creates a new instance with the specified {@link Charset}. The
+ * encoder uses a UNIX {@link LineDelimeter} and the decoder uses
* the AUTO {@link LineDelimeter}.
- *
+ *
* @param charset
* The charset to use in the encoding and decoding
*/
@@ -68,8 +68,8 @@
/**
- * Creates a new instance of TextLineCodecFactory. This constructor
- * provides more flexibility for the developer.
+ * Creates a new instance of TextLineCodecFactory. This constructor
+ * provides more flexibility for the developer.
*
* @param charset
* The charset to use in the encoding and decoding
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.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.codec.textline;
@@ -31,7 +31,7 @@
/**
* A {@link ProtocolDecoder} which decodes a text line into a string.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$,
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineEncoder.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineEncoder.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineEncoder.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineEncoder.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.codec.textline;
@@ -31,7 +31,7 @@
/**
* A {@link ProtocolEncoder} which encodes a string into a text line
* which ends with the delimiter.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$,
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/executor/AbstractExecutorFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/AbstractExecutorFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/executor/AbstractExecutorFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/executor/AbstractExecutorFilter.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.executor;
@@ -95,10 +95,12 @@
protected abstract void fireEvent(IoFilterEvent event);
+ @Override
public final void sessionCreated(NextFilter nextFilter, IoSession session) {
nextFilter.sessionCreated(session);
}
+ @Override
public final void sessionOpened(NextFilter nextFilter, IoSession session) {
if (eventTypes.contains(IoEventType.SESSION_OPENED)) {
fireEvent(new IoFilterEvent(nextFilter, IoEventType.SESSION_OPENED,
@@ -108,6 +110,7 @@
}
}
+ @Override
public final void sessionClosed(NextFilter nextFilter, IoSession session) {
if (eventTypes.contains(IoEventType.SESSION_CLOSED)) {
fireEvent(new IoFilterEvent(nextFilter, IoEventType.SESSION_CLOSED,
@@ -117,6 +120,7 @@
}
}
+ @Override
public final void sessionIdle(NextFilter nextFilter, IoSession session,
IdleStatus status) {
if (eventTypes.contains(IoEventType.SESSION_IDLE)) {
@@ -127,6 +131,7 @@
}
}
+ @Override
public final void exceptionCaught(NextFilter nextFilter, IoSession session,
Throwable cause) {
if (eventTypes.contains(IoEventType.EXCEPTION_CAUGHT)) {
@@ -137,6 +142,7 @@
}
}
+ @Override
public final void messageReceived(NextFilter nextFilter, IoSession session,
Object message) {
if (eventTypes.contains(IoEventType.MESSAGE_RECEIVED)) {
@@ -147,6 +153,7 @@
}
}
+ @Override
public final void messageSent(NextFilter nextFilter, IoSession session,
WriteRequest writeRequest) {
if (eventTypes.contains(IoEventType.MESSAGE_SENT)) {
@@ -157,6 +164,7 @@
}
}
+ @Override
public final void filterWrite(NextFilter nextFilter, IoSession session,
WriteRequest writeRequest) {
if (eventTypes.contains(IoEventType.WRITE)) {
@@ -167,6 +175,7 @@
}
}
+ @Override
public final void filterClose(NextFilter nextFilter, IoSession session)
throws Exception {
if (eventTypes.contains(IoEventType.CLOSE)) {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/executor/UnorderedExecutorFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/UnorderedExecutorFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/executor/UnorderedExecutorFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/executor/UnorderedExecutorFilter.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.executor;
@@ -34,7 +34,7 @@
* Please note that this filter doesn't manage the life cycle of the underlying
* {@link Executor}. You have to destroy or stop it by yourself.
* <p>
- * This filter does not maintain the order of events per session and thus
+ * This filter does not maintain the order of events per session and thus
* more than one event handler methods can be invoked at the same time with
* mixed order. For example, let's assume that messageReceived, messageSent,
* and sessionClosed events are fired.
@@ -67,6 +67,7 @@
super(executor, eventTypes);
}
+ @Override
protected void fireEvent(IoFilterEvent event) {
getExecutor().execute(new ProcessEventRunnable(event));
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/BlacklistFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/BlacklistFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/BlacklistFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/BlacklistFilter.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.firewall;
@@ -36,7 +36,7 @@
/**
* A {@link IoFilter} which blocks connections from blacklisted remote
* address.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -45,9 +45,9 @@
/**
* Sets the addresses to be blacklisted.
- *
+ *
* NOTE: this call will remove any previously blacklisted addresses.
- *
+ *
* @param addresses an array of addresses to be blacklisted.
*/
public void setBlacklist(InetAddress[] addresses) {
@@ -63,12 +63,12 @@
/**
* Sets the addresses to be blacklisted.
- *
+ *
* NOTE: this call will remove any previously blacklisted addresses.
- *
- * @param addresses a collection of InetAddress objects representing the
+ *
+ * @param addresses a collection of InetAddress objects representing the
* addresses to be blacklisted.
- * @throws IllegalArgumentException if the specified collections contains
+ * @throws IllegalArgumentException if the specified collections contains
* non-{@link InetAddress} objects.
*/
public void setBlacklist(Collection<InetAddress> addresses) {
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/ConnectionThrottleFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/ConnectionThrottleFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/ConnectionThrottleFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/firewall/ConnectionThrottleFilter.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.firewall;
@@ -33,7 +33,7 @@
/**
* A {@link IoFilter} which blocks connections from connecting
* at a rate faster than the specified interval.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -53,11 +53,11 @@
/**
* Constructor that takes in a specified wait time.
- *
+ *
* @param allowedInterval
* The number of milliseconds a client is allowed to wait
* before making another successful connection
- *
+ *
*/
public ConnectionThrottleFilter(long allowedInterval) {
this.allowedInterval = allowedInterval;
@@ -65,9 +65,9 @@
}
/**
- * Sets the interval between connections from a client.
+ * Sets the interval between connections from a client.
* This value is measured in milliseconds.
- *
+ *
* @param allowedInterval
* The number of milliseconds a client is allowed to wait
* before making another successful connection
@@ -79,7 +79,7 @@
/**
* Method responsible for deciding if a connection is OK
* to continue
- *
+ *
* @param session
* The new session that will be verified
* @return
@@ -98,9 +98,9 @@
Long lastConnTime = clients.get(addr.getAddress()
.getHostAddress());
- // if the interval between now and the last connection is
+ // if the interval between now and the last connection is
// less than the allowed interval, return false
- if ((now - lastConnTime) < allowedInterval) {
+ if (now - lastConnTime < allowedInterval) {
IoSessionLogger.error(session,
"Session connection interval too short");
return false;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/logging/LoggingFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/logging/LoggingFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/logging/LoggingFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/logging/LoggingFilter.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.logging;
@@ -30,13 +30,13 @@
import org.apache.mina.util.CopyOnWriteMap;
/**
- * Logs all MINA protocol events using the {@link IoSessionLogger}. Each event can be
+ * Logs all MINA protocol events using the {@link IoSessionLogger}. Each event can be
* tuned to use a different level based on the user's specific requirements. Methods
* are in place that allow the user to use either the get or set method for each event
* and pass in the {@link IoEventType} and the {@link LogLevel}.
*
- * By default, all events are logged to the {@link IoEventType.INFO} level except
- * {@link IoFilterAdapter.exceptionCaught()}, which is logged to {@link IoEventType.WARN}.
+ * By default, all events are logged to the {@link IoEventType.INFO} level except
+ * {@link IoFilterAdapter.exceptionCaught()}, which is logged to {@link IoEventType.WARN}.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
@@ -164,7 +164,7 @@
private final Map<IoEventType, LogLevel> logSettings = new CopyOnWriteMap<IoEventType, LogLevel>();
/**
- * Default Constructor.
+ * Default Constructor.
*/
public LoggingFilter() {
// Exceptions will be logged to WARN as default.
@@ -231,7 +231,7 @@
/**
* Sets the {@link LogLevel} to be used when exceptions are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when exceptions are logged.
*/
@@ -241,7 +241,7 @@
/**
* Sets the {@link LogLevel} to be used when message received events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when message received events are logged.
*/
@@ -251,7 +251,7 @@
/**
* Sets the {@link LogLevel} to be used when message sent events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when message sent events are logged.
*/
@@ -261,7 +261,7 @@
/**
* Sets the {@link LogLevel} to be used when session closed events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when session closed events are logged.
*/
@@ -271,7 +271,7 @@
/**
* Sets the {@link LogLevel} to be used when session created events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when session created events are logged.
*/
@@ -281,7 +281,7 @@
/**
* Sets the {@link LogLevel} to be used when session idle events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when session idle events are logged.
*/
@@ -291,7 +291,7 @@
/**
* Sets the {@link LogLevel} to be used when session opened events are logged.
- *
+ *
* @param logLevel
* The {@link LogLevel} to be used when session opened events are logged.
*/
@@ -302,7 +302,7 @@
/**
* This method sets the log level for the supplied {@link LogLevel}
* event.
- *
+ *
* @param eventType the type of the event that is to be updated with
* the new {@link LogLevel}
* @param logLevel the new {@link LogLevel} to be used to log the
@@ -321,7 +321,7 @@
/**
* Returns the log level for the supplied event type.
- *
+ *
* @param eventType the type of the event
*/
public LogLevel getLogLevel(IoEventType eventType) {
@@ -333,9 +333,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* exception caught events.
- *
+ *
* @return
* The {@link LogLevel} used when logging exception caught events
*/
@@ -344,9 +344,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* message received events.
- *
+ *
* @return
* The {@link LogLevel} used when logging message received events
*/
@@ -355,9 +355,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* message sent events.
- *
+ *
* @return
* The {@link LogLevel} used when logging message sent events
*/
@@ -366,9 +366,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* session closed events.
- *
+ *
* @return
* The {@link LogLevel} used when logging session closed events
*/
@@ -377,9 +377,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* session created events.
- *
+ *
* @return
* The {@link LogLevel} used when logging session created events
*/
@@ -388,9 +388,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* session idle events.
- *
+ *
* @return
* The {@link LogLevel} used when logging session idle events
*/
@@ -399,9 +399,9 @@
}
/**
- * This method returns the {@link LogLevel} that is used to log
+ * This method returns the {@link LogLevel} that is used to log
* session opened events.
- *
+ *
* @return
* The {@link LogLevel} used when logging session opened events
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/logging/MDCInjectionFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/logging/MDCInjectionFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/logging/MDCInjectionFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/logging/MDCInjectionFilter.java Sun Sep 16 16:55:27 2007
@@ -1,12 +1,14 @@
package org.apache.mina.filter.logging;
-import org.apache.mina.common.*;
+import java.net.InetSocketAddress;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.mina.common.IoEventType;
+import org.apache.mina.common.IoSession;
import org.apache.mina.filter.util.WrappingFilter;
import org.slf4j.MDC;
-import java.net.InetSocketAddress;
-import java.util.*;
-
/**
* This filter will inject some key IoSession properties into the Mapped Diagnostic Context (MDC)
* <p/>
@@ -48,6 +50,7 @@
private static final String CONTEXT_KEY = MDCInjectionFilter.class + ".CONTEXT_KEY";
private ThreadLocal<Integer> callDepth = new ThreadLocal<Integer>() {
+ @Override
protected Integer initialValue() {
return 0;
}
@@ -117,11 +120,16 @@
* @param value The value of the property
*/
public static void setProperty (IoSession session, String key, String value) {
- Context context = getContext(session);
- context.put(key, value);
+ Context context = getContext(session);
+ context.put(key, value);
}
private static class Context extends HashMap<String,String> {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -673025693009555560L;
}
-
+
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Request.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Request.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Request.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Request.java Sun Sep 16 16:55:27 2007
@@ -199,7 +199,7 @@
@Override
public String toString() {
- String timeout = (getTimeoutMillis() == Long.MAX_VALUE) ? "max"
+ String timeout = getTimeoutMillis() == Long.MAX_VALUE ? "max"
: String.valueOf(getTimeoutMillis());
return "request: { id=" + getId() + ", timeout=" + timeout
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestResponseFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestResponseFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestResponseFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestResponseFilter.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.reqres;
@@ -38,7 +38,7 @@
import org.apache.mina.common.WriteRequestWrapper;
/**
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -341,6 +341,7 @@
super(writeRequest);
}
+ @Override
public Object getMessage() {
return ((Request) super.getMessage()).getMessage();
}
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestTimeoutException.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestTimeoutException.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestTimeoutException.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/RequestTimeoutException.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.reqres;
@@ -23,9 +23,9 @@
/**
* An {@link RuntimeIOException} which is thrown when a {@link Request} is timed out.
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
- * @version $Rev$, $Date$,
+ * @version $Rev$, $Date$,
*/
public class RequestTimeoutException extends RuntimeException {
private static final long serialVersionUID = 5546784978950631652L;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Response.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Response.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Response.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/Response.java Sun Sep 16 16:55:27 2007
@@ -6,21 +6,21 @@
* 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.reqres;
/**
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspector.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspector.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspector.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspector.java Sun Sep 16 16:55:27 2007
@@ -6,21 +6,21 @@
* 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.reqres;
/**
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspectorFactory.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspectorFactory.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspectorFactory.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseInspectorFactory.java Sun Sep 16 16:55:27 2007
@@ -6,21 +6,21 @@
* 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.reqres;
/**
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseType.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseType.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseType.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/reqres/ResponseType.java Sun Sep 16 16:55:27 2007
@@ -6,21 +6,21 @@
* 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.reqres;
/**
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLByteBufferUtil.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLByteBufferUtil.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLByteBufferUtil.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLByteBufferUtil.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.ssl;
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLFilter.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLFilter.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLFilter.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLFilter.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.ssl;
@@ -49,12 +49,12 @@
* immediately, please specify {@code true} as {@code autoStart} parameter in
* the constructor.
* <p>
- * This filter uses an {@link SSLEngine} which was introduced in Java 5, so
+ * This filter uses an {@link SSLEngine} which was introduced in Java 5, so
* Java version 5 or above is mandatory to use this filter. And please note that
* this filter only works for TCP/IP connections.
* <p>
* This filter logs debug information using {@link IoSessionLogger}.
- *
+ *
* <h2>Implementing StartTLS</h2>
* <p>
* You can use {@link #DISABLE_ENCRYPTION_ONCE} attribute to implement StartTLS:
@@ -71,13 +71,13 @@
*
* // Write StartTLSResponse which won't be encrypted.
* session.write(new MyStartTLSResponse(OK));
- *
+ *
* // Now DISABLE_ENCRYPTION_ONCE attribute is cleared.
* assert session.getAttribute(SSLFilter.DISABLE_ENCRYPTION_ONCE) == null;
* }
* }
* </pre>
- *
+ *
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
*/
@@ -97,7 +97,7 @@
* attribute map as soon as {@link IoSession#write(Object)} is invoked,
* and therefore should be put again if you want to make more messages
* bypass this filter. This is especially useful when you implement
- * StartTLS.
+ * StartTLS.
*/
public static final String DISABLE_ENCRYPTION_ONCE = SSLFilter.class
.getName()
@@ -115,16 +115,16 @@
+ ".UseNotification";
/**
- * A session attribute key that should be set to an {@link InetSocketAddress}.
- * Setting this attribute causes
- * {@link SSLContext#createSSLEngine(String, int)} to be called passing the
- * hostname and port of the {@link InetSocketAddress} to get an
+ * A session attribute key that should be set to an {@link InetSocketAddress}.
+ * Setting this attribute causes
+ * {@link SSLContext#createSSLEngine(String, int)} to be called passing the
+ * hostname and port of the {@link InetSocketAddress} to get an
* {@link SSLEngine} instance. If not set {@link SSLContext#createSSLEngine()}
* will be called.
* .
- * Using this feature {@link SSLSession} objects may be cached and reused
- * when in client mode.
- *
+ * Using this feature {@link SSLSession} objects may be cached and reused
+ * when in client mode.
+ *
* @see SSLContext#createSSLEngine(String, int)
*/
public static final String PEER_ADDRESS = SSLFilter.class.getName()
@@ -151,10 +151,10 @@
private static final String SSL_HANDLER = SSLFilter.class.getName()
+ ".SSLHandler";
-
+
// SSL Context
private final SSLContext sslContext;
-
+
private final boolean autoStart;
private boolean client;
@@ -173,7 +173,7 @@
public SSLFilter(SSLContext sslContext) {
this(sslContext, true);
}
-
+
/**
* Creates a new SSL filter using the specified {@link SSLContext}.
*/
@@ -188,7 +188,7 @@
/**
* Returns the underlying {@link SSLSession} for the specified session.
- *
+ *
* @return <tt>null</tt> if no {@link SSLSession} is initialized yet.
*/
public SSLSession getSSLSession(IoSession session) {
@@ -199,7 +199,7 @@
* (Re)starts SSL session for the specified <tt>session</tt> if not started yet.
* Please note that SSL session is automatically started by default, and therefore
* you don't need to call this method unless you've used TLS closure.
- *
+ *
* @return <tt>true</tt> if the SSL session has been started, <tt>false</tt> if already started.
* @throws SSLException if failed to start the SSL session
*/
@@ -243,7 +243,7 @@
/**
* Stops the SSL session by sending TLS <tt>close_notify</tt> message to
* initiate TLS closure.
- *
+ *
* @param session the {@link IoSession} to initiate TLS closure
* @throws SSLException if failed to initiate TLS closure
* @throws IllegalArgumentException if this filter is not managing the specified session
@@ -311,7 +311,7 @@
/**
* Returns the list of cipher suites to be enabled when {@link SSLEngine}
* is initialized.
- *
+ *
* @return <tt>null</tt> means 'use {@link SSLEngine}'s default.'
*/
public String[] getEnabledCipherSuites() {
@@ -321,7 +321,7 @@
/**
* Sets the list of cipher suites to be enabled when {@link SSLEngine}
* is initialized.
- *
+ *
* @param cipherSuites <tt>null</tt> means 'use {@link SSLEngine}'s default.'
*/
public void setEnabledCipherSuites(String[] cipherSuites) {
@@ -331,7 +331,7 @@
/**
* Returns the list of protocols to be enabled when {@link SSLEngine}
* is initialized.
- *
+ *
* @return <tt>null</tt> means 'use {@link SSLEngine}'s default.'
*/
public String[] getEnabledProtocols() {
@@ -341,7 +341,7 @@
/**
* Sets the list of protocols to be enabled when {@link SSLEngine}
* is initialized.
- *
+ *
* @param protocols <tt>null</tt> means 'use {@link SSLEngine}'s default.'
*/
public void setEnabledProtocols(String[] protocols) {
@@ -451,7 +451,7 @@
newSSLE.initCause(ssle);
ssle = newSSLE;
}
-
+
throw ssle;
}
}
@@ -587,7 +587,7 @@
}
handler.flushScheduledEvents();
}
-
+
private WriteFuture initiateClosure(NextFilter nextFilter, IoSession session)
throws SSLException {
SSLHandler handler = getSSLSessionHandler(session);
@@ -666,7 +666,7 @@
/**
* A message that is sent from {@link SSLFilter} when the connection became
- * secure or is not secure anymore.
+ * secure or is not secure anymore.
*
* @author The Apache MINA Project (dev@mina.apache.org)
* @version $Rev$, $Date$
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLHandler.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLHandler.java?rev=576217&r1=576216&r2=576217&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLHandler.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SSLHandler.java Sun Sep 16 16:55:27 2007
@@ -226,7 +226,7 @@
* Check if there is any need to complete handshake.
*/
public boolean needToCompleteHandshake() {
- return (handshakeStatus == SSLEngineResult.HandshakeStatus.NEED_WRAP && !isInboundDone());
+ return handshakeStatus == SSLEngineResult.HandshakeStatus.NEED_WRAP && !isInboundDone();
}
public void schedulePreHandshakeWriteRequest(NextFilter nextFilter,
@@ -290,7 +290,7 @@
if (buf.limit() > inNetBuffer.remaining()) {
// We have to expand inNetBuffer
inNetBuffer = SSLByteBufferUtil.expandBuffer(inNetBuffer,
- inNetBuffer.capacity() + (buf.limit() * 2));
+ inNetBuffer.capacity() + buf.limit() * 2);
// We also expand app. buffer (twice the size of in net. buffer)
appBuffer = SSLByteBufferUtil.expandBuffer(appBuffer, inNetBuffer
.capacity() * 2);
@@ -352,8 +352,8 @@
// Loop until there is no more data in src
while (src.hasRemaining()) {
- if (src.remaining() > ((outNetBuffer.capacity() - outNetBuffer
- .position()) / 2)) {
+ if (src.remaining() > (outNetBuffer.capacity() - outNetBuffer
+ .position()) / 2) {
// We have to expand outNetBuffer
// Note: there is no way to know the exact size required, but enrypted data
// shouln't need to be larger than twice the source data size?