com.crankuptheamps.overview.in Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amps-client Show documentation
Show all versions of amps-client Show documentation
AMPS Java client by 60East Technologies, Inc.
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();
}
}
}
}