public class ExampleApplication extends java.lang.Object
An example application provided with the Dedistributed PTR (SAAS) Java SDK. This simple Java application illustrates how to integrate a
Clientinto an application to perform PTR lookups using the Dedistributed PTR (SAAS) service.
To try it out, you will need to have a Dedistributed PTR (SAAS) access key and secret pair. Once you have these available (after you complete registration and enrollment through the AWS Marketplace), you can edit the source of this class, compile, and run it.
The source for this class is located below the SDK root directory in
example/src/java. Edit the values assigned to the access key and secret String variables at the top of the establishSession() method. These are located at or about line 110 in the source file.
When compiled and executed, the embedded
Clientestablishes a session with a PLS instance. It then sends a query consisting of a set of randomly chosen IP addresses. These are resolved to PTR values by the PLS, returned, and then written to standard out.
Visit Developer Resources for additional resources that may be of help as you integrate the service into your applications.
Constructors Constructor Description
Modifier and Type Method Description
main(java.lang.String args)Example main.
public static void main(java.lang.String args) throws java.lang.ExceptionExample main. After editing and compiling the source, you can invoke the JVM from the command line. Assuming your current working directory is top directory of the SDK, you would invoke as follows:
$ java -cp "dedistributed-ptr-saas-sdk-1.0.jar:lib/ptr-protocol.jar:example/src/java" com.dedistributed.sdk.ptr.ExampleApplication
args- command line arguments (none expected)
java.lang.Exception- on exception