As I understand Java NIO is an API to help create event-driven applications. Where you use a selector to notify your application of any data received over a SocketChannel. JMS(Java Messaging Service) is a messaging framework for sending/receiving messages between clients.
Is J开发者_高级运维MS a abstraction of Java NIO API?
NIO just stands for New IO. It's an enhanced general Java IO package, that has a lot of support for asynchronous IO, but also contains quite a few other enhancements, like support for grepping through filenames. You would use it when you're trying to do something that's not supported by the classes in java.io.
JMS is a java messaging system. You can use it when you need to have two applications talk to one another over a queue-like system. Whether or not it uses NIO under the hoods is an implementation detail, though various JMS providers written in Java probably do.
精彩评论