Subversion Repositories Code-Repo

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
87 Kevin 1
/**************************************************************************
2
 * Copyright 2011 Jules White
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 ***************************************************************************/
16
package org.vt.ece4564.latmb;
17
 
18
import java.net.InetSocketAddress;
19
import java.util.concurrent.Executors;
20
 
21
import org.jboss.netty.bootstrap.ServerBootstrap;
22
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
23
 
24
/**
25
 * Simple SSL chat server modified from {@link TelnetServer}.
26
 *
27
 * @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
28
 * @author <a href="http://gleamynode.net/">Trustin Lee</a>
29
 *
30
 * @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
31
 */
32
public class LATMBServer {
33
 
34
    public static void main(String[] args) throws Exception {
35
        // Configure the server.
36
        ServerBootstrap bootstrap = new ServerBootstrap(
37
                new NioServerSocketChannelFactory(
38
                        Executors.newCachedThreadPool(),
39
                        Executors.newCachedThreadPool()));
40
 
41
        // Configure the pipeline factory.
42
        bootstrap.setPipelineFactory(new LATMBServerPipelineFactory());
43
 
44
        // Bind and start to accept incoming connections.
45
        bootstrap.bind(new InetSocketAddress(8080));
46
 
47
 
48
    }
49
}