With every one focused on Java 8, let me take you through some of the features in Java 9. As Java 9 is being continuously under development features discussed here might change before the final release of JDK 9. Few links to start with: In this post I am using Java 9 Build b75 downloaded …
Binary Search Tree Traversal Implemented in Java
Most of the students fresh out of their engineering studies or those who are still studying will have the concept of Binary Search Trees fresh in their minds. But with most of the people who have been out of college for many years now will kind of be having a not so clear idea of …
Bean Validation in Java EE 7 – Creating Custom Constraints and Validations
In my previous post I showed how one can make use of the default constraints provided by the Bean Validation API in validatng the model data. Bean Validation API allows the developers to define their own constraints by creating a new annotation and writing the validator which is used to validate the value. In this …
Creating Managed Threads Using ManagedThreadFactory in Java EE 7 – Part 3
So far we have seen: In Part-1: Creating ManagedExecutorService to submit a single task or a list of tasks where each task would be an implementation of either Callable or Runnable interface. In Part-2: Creating ManagedScheduledExecutorService for scheduling tasks to run at a later time or to schedule repeating tasks. In this post, which will …
ManagedScheduledExecutorService for Implementing Concurrency Utilities in Java EE 7 – Part 2
In my previous post you saw how to use the concurrency utilities in Java EE 7 by using the ManagedExecutorService. In this post we will have a look at a variant of this i.e the ManagedScheduledExecutorService. ManagedScheduledExecutorService is used to schedule tasks to be executed in future by specifying the delay in terms of SECONDS, …
A Simple Factory For Collections Using Varargs
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 …