|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
See:
Description
| Packages | |
| edu.rit.io | Package edu.rit.io contains I/O classes that add capabilities to the standard java.io I/O package. |
| edu.rit.jini.discovery | Package edu.rit.jini.discovery provides classes that implement the Jini discovery protocols, for use by a Jini service that implements (or masquerades as) the Jini Lookup Service. |
| edu.rit.jini.labinst | Package edu.rit.jini.labinst defines an API for Jini-capable laboratory instruments. |
| edu.rit.jini.labinst.pmrmi | Package edu.rit.jini.labinst.pmrmi contains an implementation of the Jini Meter Service which uses Poor Man's Remote Method Invocation (PMRMI) to communicate between the service proxy object and the service. |
| edu.rit.jini.labinst.pmrmi.j2sestub | Package edu.rit.jini.labinst.pmrmi.j2sestub contains the client-side service proxy object for the PMRMI implementation of the Jini Meter Service, which runs in a J2SE environment. |
| edu.rit.jini.labinst.pmrmi.tiniserver | Package edu.rit.jini.labinst.pmrmi.tiniserver contains the server-side service object for the PMRMI implementation of the Jini Meter Service, which runs on a Dallas Semiconductor TINITM board in a JDK 1.1 environment. |
| edu.rit.jini.labinst.pmrmi.tiniserver.rs22805 | Package edu.rit.jini.labinst.tini.rs22805 contains classes for implementing the Jini Meter Service with the Dallas Semiconductor TINITM board interfacing to a Radio Shack #22-805 digital multimeter. |
| edu.rit.jini.lease | Package edu.rit.jini.lease contains classes and interfaces for implementing leased remote objects using Poor Man's Remote Method Invocation (PMRMI). |
| edu.rit.jini.lease.pretend | Package edu.rit.jini.lease.pretend contains an implementation of a lease where there are allocated resources that have to be deallocated when the lease expires or is canceled. |
| edu.rit.jini.lookup.entry | Package edu.rit.jini.lookup.entry contains classes for various Jini service attributes. |
| edu.rit.jini.lookup.pretend | Package edu.rit.jini.lookup.pretend contains the Pretend Lookup Service, a technique that allows a network-aware but non-J2SE-capable device to provide Jini services to a Jini federation. |
| edu.rit.jini.pmrmi | Package edu.rit.jini.pmrmi defines a "Poor Man's Remote Method Invocation" API for use with JiniTM Connection Technology. |
| edu.rit.jini.watchdog | Package edu.rit.jini.watchdog defines a Jini service interface for a "watchdog," used to determine if a remote service or system is responding. |
| edu.rit.net.http | Package edu.rit.net.http contains classes for working with the HyperText Transfer Protocol (HTTP), including a bare-bones HTTP server. |
| edu.rit.util | Package edu.rit.util contains generally-useful utility classes. |
This distribution contains experimental classes for running Jini Network Technology in small places, meaning Java devices that lack the Java 2 Standard Edition (J2SE). This includes Java 2 Micro Edition Connected Limited Device Configuration (J2ME CLDC) devices as well as devices running JDK 1.1.
There are three principal components in this distribution:
I wrote and tested this distribution on a Windows 98 PC using JDK version 1.2.2 and Jini version 1.1 beta. The instructions below assume you're using that configuration. If you aren't, you'll have to adapt the instructions yourself.
To install the distribution,
unpack the ZIP file (smallplaces.zip)
in a directory of your choice.
You should see the following subdirectories
under that top directory:
| Directory | Contents |
|---|---|
Java\
|
The portion of the distribution that is compiled and run on the host PC. |
Java\clientlib\
|
Java source file and classfiles for a test client program for the Jini Meter Service. Batch files for running the test program. |
Java\doc\
|
Documentation in javadoc format
(you're reading it now).
Browse to Java\doc\index.html.
|
Java\lib\
|
Java source files and classfiles for the distribution. |
Java\project\
|
Batch files for building the distribution for the PC's J2SE environment. |
Tini\
|
The portion of the distribution that is cross-compiled on the host PC and run on the TINI board. |
Tini\download\
|
Executable image files and other files that are downloaded to the TINI board. |
Tini\lib\
|
Java source files and classfiles
that are cross-compiled for the TINI board,
a subset of the Java\lib source tree.
Each source file under Tini\lib
is identical to its counterpart
under Java\lib.
|
Tini\project\
|
Batch files for building the distribution for the TINI board's Java environment. |
To get an overview of what's in the distribution, look at the presentation I gave at the Fifth Jini Community Meeting in Amsterdam, the Netherlands, on December 12, 2000 -- "Running Jini Network Technology in Small Places." You can view the presentation on the Anhinga Project web site by clicking on the "Presentations" link.
To learn the details of what's in the distribution, I recommend the following course of study:
The remaining packages and classes in the distribution support the above packages.
Here's how to create an exact duplicate of my hardware and software environment. If your environment is different, you'll have to adapt on your own.
This software all runs on the PC.
Follow the instructions in the TINI SDK to configure the TINI board. During initial configuration, the PC connects to the TINI board through a serial cable as shown above.
You must to set up the IP configuration for the two shaded boxes in the above diagram -- the TINI board's Ethernet interface and the PC's Ethernet NIC that will be connected to the experimental Jini network (I'll call this the PC's "Jini NIC"). Since this is an isolated network, you can assign them two arbitrary IP addresses within the same subnet.
During normal operation, the PC, TINI board, and digital voltmeter are connected together as shown above. The PC's Jini NIC and the TINI board's Ethernet interface connect to the isolated Jini network via the Ethernet hub. The digital voltmeter connects to the TINI board's serial port through the null modem adapter.
C:\AUTOEXEC.BAT file:
set PCHOST=hostname of your PC
set HTTP_SERVER_HOST=%PCHOST%
set HTTP_SERVER_PORT=8080
set JININET_NIC_ADDRESS=IP address of your PC's Jini NIC
set JININET_TINI_ADDRESS=IP address of your TINI board's Ethernet interface
set JAVA_HOME=SmallPlaces root directory\Java
set JDK_HOME=JDK root directory
set JINI_HOME=Jini SDK root directory
set TINI_HOME=SmallPlaces root directory\Tini
set TINI_SDK_HOME=TINI SDK root directory
set TINI_MAC_ADDRESS=Hexadecimal MAC address of your TINI board's Ethernet interface
The SmallPlaces root directory is the full pathname of the top-level directory where you unpacked this distribution. The JDK root directory is the full pathname of the top-level directory where you installed the JDK. The Jini SDK root directory is the full pathname of the top-level directory where you installed the Jini SDK. The TINI SDK root directory is the full pathname of the top-level directory where you installed the TINI SDK.
%JAVA_HOME%\project\compileedurit.bat script.
(I encourage you to look at the commands
in this and the other batch scripts
and figure out what they do.)
The compiler will spit out one warning
about calling a deprecated method:
"Note: edu\rit\jini\discovery\MulticastDiscoveryServer.java
uses or overrides a deprecated API."
That source file calls the deprecated method
MulticastSocket.setTTL().
This class is actually used on the TINI board,
not on the PC.
In the TINI board's JDK 1.1-compliant Java environment,
this method is not deprecated.
%JAVA_HOME%\project\makeEduRitClientJar.bat script.
%JAVA_HOME%\project\compileclientlib.bat script.
%JAVA_HOME%\project\runjavadoc.bat script.
Java\ source tree
to the Tini\ source tree
by running the %TINI_HOME%\project\copysource.bat script.
%TINI_HOME%\project\compileall.bat script.
Note that the cross-compilation is done
using the PC's JDK 1.2.2 Java compiler
with the TINI SDK's JDK 1.1 Java boot class library.
%TINI_HOME%\project\makemeterservice.bat script.
This creates the file
%TINI_HOME%\download\MeterService.tini.
%TINI_HOME%\project\makemsjlusjar.bat script.
This creates the file
%TINI_HOME%\download\msjlus.jar.
%TINI_HOME%\project\makemsjlusser.bat script.
This creates the file
%TINI_HOME%\download\msjlus.ser.
route add %JININET_TINI_ADDRESS% mask 255.255.255.255 %JININET_NIC_ADDRESS% metric 1
If you reboot Windows, you will have to repeat this command.
If you wish, you can have Windows execute this command automatically
by putting it in a batch script file
in the C:\Windows\Start Menu\Programs\StartUp\ directory.
mkdir /bin
mkdir /webroot
%TINI_HOME%\download\msjlus.jar
to the TINI board's /webroot directory
%TINI_HOME%\download\msjlus.ser
to the TINI board's /bin directory
%TINI_HOME%\download\MeterService.tini
to the TINI board's /bin directory
stopserver -s
Hit y when it prompts you.
cd /bin
java MeterService.tini msjlus.ser &
%JAVA_HOME%\clientlib\runLookupBrowser.bat script.
If all is well,
the Lookup Browser should do multicast discovery
over the Jini network
and discover a Lookup Service on the TINI board.
The Lookup Browser should show two services registered,
one the Pretend Lookup Service itself,
the other the Jini Meter Service.
%JAVA_HOME%\clientlib\runMeterDisplay.bat script.
If all is well,
the Meter Display program
should do multicast discovery
over the Jini network
find the Jini Meter Service on the TINI board,
and display the service's icon and name
at the top of the window.
When the Meter Display program has started but before it discovers a Jini Meter Service, it looks like this:
When the Meter Display program has discovered a Jini Meter Service, it displays the service's icon and name at the top:
The Meter Display program shows the red "SERVICE IS DOWN" message whenever a RemoteException is thrown. This will happen when the program calls a Jini Meter Service method if the digital voltmeter is turned off or if any connection between the PC and the digital voltmeter fails.
Make sure the digital voltmeter is turned on, then click the Meter Display's "Read" button. The program gets one reading from the Jini Meter Service and displays it:
Click the "Start" button to cause the Jini Meter Service to report a new reading once every second. Click the "Stop" button to stop periodic readings again. Click the "Exit" button to exit the Meter Display program.
The documentation and Java source files in the Jini For Small Places Distribution ("The Software") are copyright © 2000, 2001 by the Rochester Institute of Technology. All rights reserved. For further information, contact the author, Alan Kaminsky, at ark@it.rit.edu.
Use and distribution of the Software are subject to the Sun Community Source License, Version 3.0, Jini Technology Specific Attachment, Version 1.0 (the License) available at http://sun.com/software/communitysource. You may not use the Software except in compliance with the License. Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
This distribution is available to SCSL licensees from the Anhinga Project web site at http://www.cs.rit.edu/~anhinga. Click on the "Downloads" link. Please send questions, comments, and bug reports to the Anhinga Project email distribution list at mailto:anhinga@jini.org. Archives of the email DL are located at http://developer.jini.org/cgi-bin/wilma/anhinga.
Jini For Small Places is part of the Anhinga Project, an ongoing research effort in the Information Technology Laboratory of the Rochester Institute of Technology.
Alan Kaminsky
Senior Research Engineer
Information Technology Laboratory
Rochester Institute of Technology
102 Lomb Memorial Drive
Rochester, NY 14623-5608
USA
Phone: 716-475-6789
Fax: 716-475-7100
Email: ark@it.rit.edu
Web: http://www.cs.rit.edu/~ark
Jini For Small Places Version 16-Oct-2001
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||