com.crankuptheamps.overview.in Maven / Gradle / Ivy
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();
}
}
}
}