
Chapter 3: Java Support Samples
Making a distributed function call
byte[] bData = "Bart|Simpson|M|8|IL".getBytes();
// One possible way using the Sfm proxy
iRet = impactClient.route_veng("sourcename", "Eng1", bData);
// Another way creating an argument wrapper
RouteArguments argWrapper = new RouteArguments ();
argWrapper.source="AcqAimSample";
argWrapper.route="ENGINE";
argWrapper.data=bData;
iRet = impactClient.sendDfc("route_veng",50,30,argWrapper);
// Can also use the RouteRecxArguments wrapper for advanced options
// on the route call
// Printing result
System.out.println(" AcqAimSample::Send transaction(2) return " + iRet);
// More function through the SfmDfcProxy
// Other ways to send data to an sfm using the DfcSfmProxy
int iRet = impactClient.route_recx( "source1",
"ENGINE",
new String("Bart|Simpson|M|8|IL").getBytes(),
256,
(char)20,
"serialkey123");
int iRet = impactClient.route_vrec( "source1",
"ENGINE",
new String("Bart|Simpson|M|8|IL").getBytes(),
);
int iRet = impactClient.route_veng( "source1",
"ENGINE",
new String("Bart|Simpson|M|8|IL").getBytes(),
);
int iRet = impactClient.route_vprod("source1",
"prod1",
new String("Bart|Simpson|M|8|IL").getBytes(),
);
Copyright © 2005. Sybase Inc. All rights reserved.
|
|
View this book as PDF 