getEncoder() throws Exception;
39 | }
40 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/demux/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Protocol codecs that helps you to implement even more complex protocols by splitting a codec into multiple sub-codecs.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.codec.demux;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Filter implementations that helps you to implement complex protocols via 'codec' concept.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.codec;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/serialization/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Protocol codecs which uses Java object serilization and leads to rapid protocol implementation.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.codec.serialization;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/statemachine/ConsumeToLinearWhitespaceDecodingState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.filter.codec.statemachine;
21 |
22 | /**
23 | * {@link DecodingState} which consumes all bytes until a space (0x20) or tab
24 | * (0x09) character is reached. The terminator is skipped.
25 | *
26 | * @author mina4-android
27 | */
28 | public abstract class ConsumeToLinearWhitespaceDecodingState extends ConsumeToDynamicTerminatorDecodingState {
29 |
30 | /**
31 | * @return true if the given byte is a space or a tab
32 | */
33 | @Override
34 | protected boolean isTerminator(byte b) {
35 | return (b == ' ') || (b == '\t');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/statemachine/LinearWhitespaceSkippingState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.filter.codec.statemachine;
21 |
22 | /**
23 | * {@link DecodingState} which skips space (0x20) and tab (0x09) characters.
24 | *
25 | * @author mina4-android
26 | */
27 | public abstract class LinearWhitespaceSkippingState extends SkippingState {
28 |
29 | /**
30 | * {@inheritDoc}
31 | */
32 | @Override
33 | protected boolean canSkip(byte b) {
34 | return b == 32 || b == 9;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/codec/textline/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * A protocol codec for text-based protocols.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.codec.textline;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/errorgenerating/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * An IoFilter that provides flexible error generation facilities.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.errorgenerating;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/executor/IoEventSizeEstimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.filter.executor;
21 |
22 | import org.apache.mina.core.session.IoEvent;
23 |
24 | /**
25 | * Estimates the amount of memory that the specified {@link IoEvent} occupies
26 | * in the current JVM.
27 | *
28 | * @author mina4-android
29 | */
30 | public interface IoEventSizeEstimator {
31 | /**
32 | * Estimate the IoEvent size in number of bytes
33 | * @param event The event we want to estimate the size of
34 | * @return The estimated size of this event
35 | */
36 | int estimateSize(IoEvent event);
37 | }
38 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/executor/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * IoFilters that provide flexible thread model and event queue monitoring interface.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.executor;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/firewall/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Classes that implement IoFilter and provide host blocking and throttling.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.firewall;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/keepalive/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * IoFilter that provides the ability for connections to remain open when data is not being transferred.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.keepalive;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Useful IoFilter implementations.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/ssl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Classes that implement IoFilter and provide Secure Sockets Layer functionality.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.ssl;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/statistic/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Classes that implement IoFilter and provide the ability for filters to be timed on their performance.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.statistic;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/stream/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Stream based IoFilter implementation.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.stream;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/util/NoopFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.filter.util;
21 |
22 | import org.apache.mina.core.filterchain.IoFilterAdapter;
23 |
24 | /**
25 | * A Noop filter. It does nothing, as all the method are already implemented
26 | * in the super class.
27 | *
28 | *
29 | * This class is used by tests, when some faked filter is needed to test that the
30 | * chain is working properly when adding or removing a filter.
31 | *
32 | * @author mina4-android
33 | */
34 | public class NoopFilter extends IoFilterAdapter {
35 | }
36 |
--------------------------------------------------------------------------------
/src/org/apache/mina/filter/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Utility classes for the MINA filtering portion of the library.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.filter.util;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/handler/chain/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * A handler implementation that helps you implement sequentially layered protocols using Chains of Responsibility pattern.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.handler.chain;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/handler/demux/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * A handler implementation that helps you implement complex protocols by splitting
23 | * messageReceived handlers into multiple sub-handlers.
24 | *
25 | * @author mina4-android
26 | */
27 | package org.apache.mina.handler.demux;
28 |
--------------------------------------------------------------------------------
/src/org/apache/mina/handler/multiton/SingleSessionIoHandlerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.handler.multiton;
21 |
22 | import org.apache.mina.core.session.IoSession;
23 |
24 | /**
25 | * A factory that creates {@link SingleSessionIoHandler} to be used with one
26 | * particular session.
27 | *
28 | * @see SingleSessionIoHandler
29 | *
30 | * @deprecated this class is deprecated
31 | *
32 | * @author mina4-android
33 | */
34 | @Deprecated
35 | public interface SingleSessionIoHandlerFactory {
36 |
37 | /**
38 | * @return a {@link SingleSessionIoHandler} for the given session.
39 | *
40 | * @param session the session for which a handler is requested
41 | * @throws Exception If we can't get the handler
42 | */
43 | SingleSessionIoHandler getHandler(IoSession session) throws Exception;
44 | }
45 |
--------------------------------------------------------------------------------
/src/org/apache/mina/handler/multiton/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Enables creating a handler per session instead of having one handler for many sessions, using Multiton pattern.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.handler.multiton;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/handler/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Useful IoHandler implementations.
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.handler;
27 |
--------------------------------------------------------------------------------
/src/org/apache/mina/proxy/filter/ProxyHandshakeIoBuffer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.proxy.filter;
21 |
22 | import org.apache.mina.core.buffer.IoBuffer;
23 | import org.apache.mina.core.buffer.IoBufferWrapper;
24 |
25 | /**
26 | * ProxyHandshakeIoBuffer.java - {@link IoBuffer} wrapper to indicate handshake
27 | * related messages which should not be passed upstream of the {@link ProxyFilter}.
28 | *
29 | * @author mina4-android
30 | * @since MINA 2.0.0-M3
31 | */
32 | public class ProxyHandshakeIoBuffer extends IoBufferWrapper {
33 | /**
34 | * Creates a new ProxyHandshakeIoBuffer instance
35 | * @param buf The wrapped buffer
36 | */
37 | public ProxyHandshakeIoBuffer(final IoBuffer buf) {
38 | super(buf);
39 | }
40 | }
--------------------------------------------------------------------------------
/src/org/apache/mina/transport/socket/nio/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Socket (TCP/IP) and Datagram (UDP/IP) support based on Java NIO (New I/O) API.
23 | *
24 | * Configuring the number of NIO selector loops
25 | *
26 | * You can specify the number of Socket I/O thread to utilize multi-processors efficiently by
27 | * specifying the number of processing threads in the constructor. The default is 1
28 | *
29 | * @author mina4-android
30 | */
31 | package org.apache.mina.transport.socket.nio;
32 |
--------------------------------------------------------------------------------
/src/org/apache/mina/transport/vmpipe/DefaultVmPipeSessionConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.transport.vmpipe;
21 |
22 | import org.apache.mina.core.session.AbstractIoSessionConfig;
23 |
24 | /**
25 | * A default implementation of {@link VmPipeSessionConfig}.
26 | *
27 | * @author mina4-android
28 | */
29 | class DefaultVmPipeSessionConfig extends AbstractIoSessionConfig implements VmPipeSessionConfig {
30 | DefaultVmPipeSessionConfig() {
31 | // Do nothing
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/org/apache/mina/transport/vmpipe/VmPipeSessionConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.transport.vmpipe;
21 |
22 | import org.apache.mina.core.session.IoSessionConfig;
23 |
24 | /**
25 | * An {@link IoSessionConfig} for vmpipe transport type.
26 | *
27 | * @author mina4-android
28 | */
29 | public interface VmPipeSessionConfig extends IoSessionConfig {
30 | // Do nothing
31 | }
32 |
--------------------------------------------------------------------------------
/src/org/apache/mina/transport/vmpipe/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * In-VM pipe support which removes the overhead of local loopback communication.
23 | *
24 | * What is 'in-VM pipe'?
25 | *
26 | * In-VM pipe is a direct event forwarding mechanism between two
27 | * ProtocolHandler
s in the
28 | * same Java Virtual Machine. Using in-VM pipe, you can remove the overhead
29 | * of encoding and decoding which is caused uselessly by local loopback
30 | * network communication. Here are some useful situations possible:
31 | *
32 | * - SMTP server and SPAM filtering server,
33 | * - web server and Servlet/JSP container.
34 | *
35 | *
36 | * Please refer to Tennis example.
37 | *
38 | *
39 | *
40 | * @author mina4-android
41 | */
42 | package org.apache.mina.transport.vmpipe;
43 |
--------------------------------------------------------------------------------
/src/org/apache/mina/util/DaemonThreadFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.util;
21 |
22 | import java.util.concurrent.Executors;
23 | import java.util.concurrent.ThreadFactory;
24 |
25 | /**
26 | * A Thread Factory that creates Daemon threads
27 | *
28 | *
29 | * @author mina4-android
30 | */
31 | public class DaemonThreadFactory implements ThreadFactory {
32 | /**
33 | * {@inheritDoc}
34 | */
35 | @Override
36 | public Thread newThread(Runnable runnable) {
37 | // Create daemon threads.
38 | Thread thread = Executors.defaultThreadFactory().newThread(runnable);
39 | thread.setDaemon(true);
40 |
41 | return thread;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/org/apache/mina/util/DefaultExceptionMonitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.util;
21 |
22 | import org.apache.mina.core.service.IoService;
23 | import org.apache.mina4.android.log.Mina4Log;
24 |
25 | /**
26 | * A default {@link ExceptionMonitor} implementation that logs uncaught
27 | * exceptions using {@link Logger}.
28 | *
29 | * All {@link IoService}s have this implementation as a default exception
30 | * monitor.
31 | *
32 | * @author mina4-android
33 | */
34 | public class DefaultExceptionMonitor extends ExceptionMonitor {
35 |
36 | private static final String TAG = DefaultExceptionMonitor.class.getName();
37 |
38 | /**
39 | * {@inheritDoc}
40 | */
41 | @Override
42 | public void exceptionCaught(Throwable cause) {
43 | if (cause instanceof Error) {
44 | throw (Error) cause;
45 | }
46 |
47 | Mina4Log.w(TAG, "Unexpected exception.\n" + cause.toString());
48 | }
49 | }
--------------------------------------------------------------------------------
/src/org/apache/mina/util/ExpirationListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.util;
21 |
22 | /**
23 | * A listener for expired object events.
24 | *
25 | * @param The event type
26 | *
27 | * @author mina4-android
28 | */
29 | public interface ExpirationListener {
30 | /**
31 | * Adds a given event to the listener
32 | *
33 | * @param expiredObject The expired event
34 | */
35 | void expired(E expiredObject);
36 | }
37 |
--------------------------------------------------------------------------------
/src/org/apache/mina/util/byteaccess/ByteArrayFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 | package org.apache.mina.util.byteaccess;
21 |
22 | /**
23 | * A factory for ByteArray
s.
24 | *
25 | * @author mina4-android
26 | */
27 | public interface ByteArrayFactory {
28 | /**
29 | * Creates an instance of {@link ByteArray} of size specified by the
30 | * size parameter.
31 | *
32 | * @param size
33 | * The size of the ByteArray
34 | * @return
35 | * The ByteArray
36 | */
37 | ByteArray create(int size);
38 | }
--------------------------------------------------------------------------------
/src/org/apache/mina/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | *
19 | */
20 |
21 | /**
22 | * Miscellaneous utility classes
23 | *
24 | * @author mina4-android
25 | */
26 | package org.apache.mina.util;
27 |
--------------------------------------------------------------------------------