| Title: 3.4 - Connector |
| NavPrev: ch3.3-acceptor.html |
| NavPrevText: 3.3 - Acceptor |
| NavUp: ch3-service.html |
| NavUpText: Chapter 3 - Service |
| NavNext: ../ch4-session/ch4-session.html |
| NavNextText: Chapter 4 - Session |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| 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. |
| |
| # 3.4 - Connector |
| |
| For client applications, you need to implement an implementation of the IoConnector interface. |
| |
| ## IoConnector |
| |
| As we have to use an IoAcceptor for servers, you have to implement the IoConnector. Again, we have many implementation classes : |
| |
| * __NioSocketConnector__ : the non-blocking Socket transport Connector |
| * __NioDatagramConnector__ : the non-blocking UDP transport * Connector* |
| * __AprSocketConnector__ : the blocking Socket transport * Connector*, based on APR |
| * __ProxyConnector__ : a Connector providing proxy support |
| * __SerialConnector__ : a Connector for a serial transport |
| * __VmPipeConnector__ : the in-VM * Connector* |
| |
| Just pick the one that fit your need. |
| |
| Here is the class diagram for the IoConnector interfaces and classes : |
| |
| ![](../../../staticresources/images/mina/IoServiceConnector.png) |
| |