Hi All,
Are there any APIs to connect to dispatchers and get cached files pro-grammatically.We want to get basically json files and process them.
Please help me if anyone is already done the similar kind of implementations and share your experience.
Thanks,
GK
Solved! Go to Solution.
Views
Replies
Total Likes
Dispatcher is just a proxy. Use any http client or url connection to connect to webserver and get data.
http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html
import java.net.*;
import java.io.*;
public class URLConnectionReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://localhost:4503/content/geometrixx-outdoors/en.json");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Views
Replies
Total Likes
Dispatcher is just a proxy. Use any http client or url connection to connect to webserver and get data.
http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html
import java.net.*;
import java.io.*;
public class URLConnectionReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://localhost:4503/content/geometrixx-outdoors/en.json");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Views
Replies
Total Likes