tags:

views:

3157

answers:

6

High I am new to java NIO. I have to write a simple server client communication program using java NIO. So is there any sample programs or any link where can I go for this.

Thanks Bapi

+1  A: 

I beleive you should take a look on Apache HttpComponents if your applcation uses HTTP, of course. There are several examples provided within downloadable library archive. Note that httpcore, httpcore-nio and httpclient are part of the project.

Cheers.

Artyom Sokolov
+4  A: 

You might give a look at Apache Mina. If you only want to learn java NIO it might me a little to hard to grasp.

jassuncao
Hi,Thanks for your co-operation Finally I have created socket client program.
Deepak
A: 

You should look at the online tutorials available. Building Highly Scalable Servers with Java NIO looks particularly relevant.

IBM has a tutorial (registration required) whilst Sun has some simple examples of the different facilities of NIO (not just client/server APIs)

Brian Agnew
+1  A: 

Have a look in your JDK under the directory called sample

Peter Lawrey
A: 

Hi, I found a nice link which shows how to create server socket using java NIO

http://www.owlmountain.com/tutorials/NonBlockingIo.htm#_Toc524339526

Thanks Bapi

Deepak
+10  A: 

Apache Mina
http://mina.apache.org
Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily.

xSocket
http://xsocket.sourceforge.net
xSocket is an easy to use NIO-based library to build high performance, highly scalable network applications.

JBoss Netty
http://www.jboss.org/netty
The Netty project is an effort to provide an asynchronous event-driven network application framework and tools for rapid development of maintainable high performance and high scalability protocol servers and clients.

Sun MicroSystem's Grizzly
https://grizzly.dev.java.net/
The Grizzly framework has been designed to help developers to take advantage of the Java NIO API. Grizzly goals is to help developers to build scalable and robust servers using NIO.

NIO Framework
http://nioframework.sourceforge.net
The NIO Framework is a library on top of NIO that hides most of the complexity of plain NIO. With the NIO Framework you can implement high-performance Java network applications without having to deal with all the nasty details of NIO.

QuickServer
http://www.quickserver.org
QuickServer is an open source Java library/framework for quick creation of robust multi-client TCP server applications. QuickServer provides an abstraction over the ServerSocket, Socket and other network and input output classes and it eases the creation of powerful network servers.

Aries McRae