Suppose you want to create a list object in Java and populate it with some default elements, how would you go about coding it? One will pursue one of the following approaches: (If you have any other approach feel free to share them via the comments and we will update the post accordingly). In the …
Using Encoder With WebSocket in Java EE 7
In my previous post I wrote about using decoders with WebSocket. In the same post I mentioned about Encoders and that they are used for encoding the Java objects or any data into some string/binary format which is then sent to the client end point of the websocket connection. In this post I will elaborate …
Using Decoder With WebSocket In Java EE 7
This post is part of the series of posts covering different JavaEE 7 features. In the past I wrote about: Creating WebSocket using JavaEE 7 Parsing JSON using the JSR 353 implementation in JavaEE 7- Using the Streaming API. Parsing JSON using the JSR 353 implementation in JavaEE 7- Using the Object Model API. This …
Creating JSON Data Using The Java JSON API (JSR 353)
JSON has been around for quite sometime now and lot of languages are offering out of the box support for parsing and creating JSON data. The JDK didn’t have support for parsing and creating JSON data out of the box. One had to make use of libraries for parsing and creating JSON data like Google …
JSON Processing in JavaEE 7- Using Object Model API
In my previous post about JSON processing I introduced you to the sample application and then showed how one can make use of the Streaming API to parse the JSON data. The JSON Streaming API was not suited for scenarios explained in my previous post. In such scenarios one can make use of the Object …
JSON Processing in JavaEE 7- Using Streaming API
If you are wondering what JSON is (Read : What is JSON?), you might want to read this article of mine. Java didn’t have a support for JSON processing out of the box. Developers had to include external libraries to enable JSON processing. But with JSR 353 we have support for JSON processing in Java …
WebSocket Support in Java EE 7
I am going to divide this post into following topics for ease of understanding to the readers: What is a WebSocket? JavaEE 7 Support for creating WebSocket end points Javascript support to create WebSocket client end point What is a WebSocket? It is a feature being introduced as part of the HTML5 specification. It introduces …
Asynchronous Servlet – A new feature in Servlet 3.0 and Java EE 6
When Java EE 6 was announced with a new servlet specification i.e Servlet 3.0 – Asynchronous servlet was a very important feature added to the new specification. Suppose your servlet does a long running task like making a JDBC call or invoking a web service, such operations generally take up a lot of CPU time …