org.dancres.blitz.stats
package.
.jar
's:
jsk-platform.jar, jsk-lib.jar
from the JINI 2.x distribution.stats.jar
from the Blitz distribution. This .jar
contains classes which must be available to the client when it is run (they cannot be downloaded). Note that the proxy code in blitz-dl.jar
will be downloaded as usual./jini2_1
and your Blitz distribution is in /blitz
, you can compile the example as follows:
cd /blitz/examples/statsclient javac -classpath /jini2_1/lib/jsk-lib.jar:/jini/jini2_1/lib/jsk-platform.jar:/blitz/lib/stats.jar *.java
Before starting the example, ensure that you have a Blitz instance running in a public lookup group - see the Installation Guide. This is necessary because the Lookup
class does a single lookup and discover step - it does not register with discovered lookup services. Thus, if a Blitz instance isn't registered beforehand, it will not be found (I'll fix this in a future release!).
cd /blitz java -Djava.security.policy=config/policy.all -classpath /jini2_1/lib/jsk-lib.jar:/jini2_1/lib/jsk-platform.jar:/blitz/examples/statsclient:/blitz/lib/stats.jar stats.TestClient
// Default Stats to make available stats = new Switch[] {new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.TAKE_OPS, true), new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.READ_OPS, true), new OpSwitch(OpSwitch.ALL_TYPES, OpSwitch.WRITE_OPS, true)};