Hello JINI - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Hello JINI

Description:

client : It would like to make use of this service. ... RMID Daemon. A RMI daemon for executing remote code (if the Jini service is actually remote) ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 17
Provided by: leo64
Category:
Tags: jini | daemon | hello

less

Transcript and Presenter's Notes

Title: Hello JINI


1
Hello JINI
  • 8/5 Home network seminar jini team

2
Contents
1. JINI BASIC.
2. Source Files.
3. Next Plan.
3
JINI BASIC
  • Service such as a printer, scanner, storage
    device, a software service etc.
  • client It would like to make use of this
    service.
  • lookup service (LUS) This essentially is a
    service locator

4
A Simple JINI Architecture
5
Registering JINI Services
  • Discovery Finding Lookup Services
  • Join Registering a Service (Jini Service)

6
Registar Parameter(1)
  • ServiceItem(ServiceID id, Object service, Entry
    attrSets)
  • id - universally unique identifier (UUID) for
    registered services (128-bit value). Service IDs
    are intended to be generated only by lookup
    services, not by clients.
  • service the object implementing the actual
    Jini Service i.e. the Java proxy object
  • attrSets attribute sets include extra
    information about the service. Examples of these
    are icons classes that provide GUIs for the
    service and objects that give more information
    about the service.

7
Registar Parameter(2)
  • Leases
  • Jini uses leases to keep information about
    services current Access to a service is leased
    for a given duration If a client wants the
    service longer, it must request a lease renew
    before the end of the lease At the end of a
    lease, a clients access to the service is
    terminated
  • Lease.ANY - the service lets the lookup service
    decide on the time
  • Lease.FOREVER - the request is for a lease that
    never expires

8
An Enhanced JINI Architecture
9
Ready to Run JINI(1)
  • HTTP Server
  • need to start a HTTP server for communicating
    data files between the Jini client/service and
    the Jini Lookup Service.
  • java -jar -classpath JINI_CLASSPATH
  • JINIHOME\lib\tools.jar -port 8081 dir
  • JINIHOME\lib verbose

10
Ready to Run JINI(2)
  • RMID Daemon
  • A RMI daemon for executing remote code (if the
    Jini service is actually remote)
  • rmid -J-Dsun.rmi.activation.execPolicynone
  • Enable logging for debugging purposes.
  • -J-Djava.rmi.server.logCallstrue

11
Ready to Run JINI(3)
  • The Jini Lookup Service
  • java -jar -classpath JINI_CLASSPATH
  • -Djava.security.policyJINIHOME/example/lookup/
    policy.all
  • JINIHOME/lib/reggie.jar
  • http//localhost8081/reggie-dl.jar
  • JINIHOME/example/lookup/policy.all
  • reggie_log public

12
Needed Files
  • 1. MyServer.java The Jini service which is an
    implementation of the MyServerInterface
  • 2. MyServerInterface.java The interface to the
    Jini service i.e. the Java Proxy object
  • 3. MyClient.java The client who wishes to make
    use of this service.

13
Source Code
  • The Server Code(MyServer.java)

14
Source Code(Cont)
  • The Server Interface Code(MyServerInterface.java)

15
Source Code(Cont)
  • The Client Code(MyClient.java)

16
Next Plan
  • 1. Running Hello JINI service using Acquired
    Source
  • 2. Learning RMI Comm.
  • Reference Site Cardiff University of Computer
    Science
  • http//users.cs.cardiff.ac.uk/Ian.J.Taylor/Distr
    ibutedSystems/Notes/lecture7.pdf
  • Overview of JINI http//pandonia.canberra.e
    du.au/java/jini/tutorial/Overview.htmlJini
Write a Comment
User Comments (0)
About PowerShow.com