How would you like your Java?

With the release of the first version of the Java Wrappers for iControl, you as a user have several options for how to use Java with the BIG-IP. This Tech Tip helps you understand what these options are and when you might wish to use each.

Option 1: The Java iControl API

This is the API as you have always had it. Download the API, build it according to the instructions included, and you can then make calls to the API. This option is best if you are used to using the API and don't mind maintaining the extra code required to get pieces working. This option is the only one that lets you work with old or variant versions of the Java compiler - because it lets you build the library with your own tools.

Option 2: The Java Assembly

The assembly is designed to make loading and using the classes of the API easier. It comes pre-built for a version of the Java compiler, and allows you to just load the assembly to get instant access to all of the APIs available. Since the Assembly handles instantiation and loading, all you have to do is include the assembly in your project and instantiate the one over-arching class. Everything from there is a method call, making things a bit easier on you, no messing with building the API. This is good for use if it supports the version of Java you're currently using, and you already have a mass of iControl code and prefer to stay close to that coding style.

Option 3: The Java Wrappers

The Java Wrappers project is designed to eliminate all of the underlying communications code for you. We handled finding and contacting the API, you just instantiate classes and call methods like the APIs were local classes. This is good because it leaves you less lines of code to maintain and the most used APIs have rather simplified interfaces. The entire API is available as in option #1 if you want to do something the wrappers do not yet support. Use the wrappers if they support the version of Java that you are currently using and you're new to iControl. Both the iControl API and the Java Wrappers project have samples that will help you to understand how to use them, and all of these options are supported on DevCentral via the forums and the various tutorials available. It is our intention to maintain all three versions going forward, because we are all about making it easy for you to do your job. The Java Wrappers are only a partial implementation, and we will be expanding them over time to cover some of the more obscure classes and offer more options on the classes already implemented.

Coding for MIDP/JavaME

We have another project in the works that will release a class library that supports MIDP programming. The default API does not support Java Micro Edition because the Axis libraries are not supported in some popular handheld devices (most notably Blackberry), and are rather large even on the JME platforms that do support them. So we are implementing that solution using the kSOAP2 libraries. Expect to see pre-built iControl libraries for MIDP in the not-too-distant future, including samples that will allow you to monitor your BIG-IP from any JavaME compliant device.

In the end, use the method that works best for you and your organization. All of these systems are based upon the core API and will be updated when it is updated.