vADC Docs

Collected Tech Tips: Java Extension Examples

by on ‎02-28-2013 02:35 AM - edited on ‎06-16-2015 04:50 PM by PaulWallace (2,797 Views)

Java Extensions are one of the 'data plane' APIs provided by Stingray Traffic Manager to process network transactions.  Java Extensions are invoked from TrafficScript using the java.run() function.

 

This article contains a selection of technical tips and solutions to illustrate the use of Java Extensions.

 

Basic Language Examples

 

 

Advanced Language Examples

 

 

Java Extensions in other languages

 

 

More information

 

Comments
by richardsonkane75
‎03-19-2016 11:45 PM - edited ‎03-19-2016 11:47 PM

Instead, you can make a regular static method, or write your own class.

 

Instead you can either create regular subclass of your list implementation or create anonymous inner class:

List<String> list = new ArrayList<String>() {
public String getData() {
return ""; // add your implementation here.
}
};
The problem is to call this method. You can do it "in place":

new ArrayList<String>() {
public String getData() {
return ""; // add your implementation here.
}
}.getData();

Contributors