AMPS Java Client (4.0.0.3 manual build)

The AMPS Java client makes it easy to build reliable, high performance messaging applications in Java.

See:
          Description

Packages
com.crankuptheamps.client This package contains the AMPS Java client.
com.crankuptheamps.client.exception This package contains exceptions thrown by the AMPS Java client.
com.crankuptheamps.client.fields This package contains helper classes for formatting and parsing messages to AMPS.
com.crankuptheamps.spark This package contains spark, a command line tool for working with AMPS.

 

The AMPS Java client makes it easy to build reliable, high performance messaging applications in Java.

These pages are the detailed reference for the client. For an overview and introduction, see the Java Development Guide that came with the client download, or the Java Developer's page on the 60East website.

Using the client is simple:


import com.crankuptheamps.client.*;

class HelloAmps
{
  public static void main(String[] args)
  {
    Client amps = new Client("myapplication");

    try
    {
      amps.connect("tcp://ampserver.example.com:9007/json");

      try(MessageStream ms = client.subscribe("orders",
                                              "/symbol LIKE 'ABCD'"))
      {
          for (Message m : ms)
          {
             System.out.println(m.getData());
          }
      }
    }
    catch (AMPSException exception)
    {
      exception.printStackTrace();
    }
  }
}
 
}