java device driver kit (jddk) tom saulpaugh sun microsystems, inc

31

Upload: pedro-ibbotson

Post on 30-Mar-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc
Page 2: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Java Device Driver Kit(JDDK)

Tom SaulpaughSun Microsystems, Inc.

Page 3: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JDDK Introduction

JDDK enables Java device drivers for JavaOS™, Solaris™, Windows™, OS/2™, Macintosh™, Linux or any other host OS supporting JDK 1.1.6 or better

The next step beyond javax.comm in local device support on the Java software platform

Supports horizontal (WORA) and vertical market software

Java Point Of Sale (JavaPOS™) retail software

- http://www.javapos.com/ Java Point Of Sale (JxFS™) financial software

- http://www.jxfs.com/

Page 4: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JDDK Relationships to:

Java Platform Services (JPS)

- Core code of JDDK shared with JavaOS

JavaOS

- Shares JPS codebase including JSD, JSL, JSE, and Security Manager

JDK

- JDDK runs as a configurable Java software application

Java Communications API (javax.comm)

- Loadable package configured by JDDK

Page 5: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Current & Future JavaPOS, JDDK and JavaOS Releases

JavaPOS 1.3 released, with 1.4 in development

JDDK FCSc2 released

- June 30th, 1999

Final JDDK FCS in development

- Summer 99

JavaOS For Business v2.1 released

- Nov 98

JavaOS For Business v2.2 in development

- Summer 99

Page 6: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

What’s in the JDDK?

Documentation

- Readme, javadoc, JPS Specification, JSD Spec

JPS.jar

- JSD, JSL, JSE, Security Manager classes

Sample business cards

Sample applications

Sample services

Sample packages

Page 7: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

What’s NOT in the JDDK?

CommAPI and the JDK

- Download these from Java Developer Connection (JDC)

- Get correct version for your host OS

Java Software Toolset and IDE

- Use your favorite one (The JDDK group likes the Metrowerks CodeWarrior™ product)

JavaOS or any other OS / native libraries

Thin-client or Fat-client admin toolset

Page 8: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

What can you do with the JDDK?

Write WORA and/or local device-aware software

- Apps

- Drivers

- Services

- Packages

Use it as a JavaOS For Business software development tool free

Deploy it as a Java client configuration framework

- Admin toolset (Browser) needed

Page 9: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JDDK Installation

It’s easy:

Create a directory on client for the JDDK

Unzip the JDDK zip file

- Sample JavaSystemFolder created (JDDK root mount pt.)

- Creates configuration sub-directories and files necessary to run sample demo

- Creates demo directory containing sample jars

- Creates doc directories

- Creates archive directory

Page 10: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JDDK FCSc2 Contents

Page 11: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Running the Sample JDDK Demo

Start the JRE

- JDK 1.1.6 classes.zip in classpath

- JPS.jar and javax.comm in classpath

Specify JPSMain as the main startup class

- javaos.javax.system.platform.JPSMain

Specify config mount pt. to JPSMain

- “myclient/JavaSystemFolder”

Specify debug lvl (0,1,2) and options (-rescan)

Page 12: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

What’s in the Demo?

JavaPOS 1.3 package

- /system/package/jpos13.jar

- Loaded first by JDDK

Sample JavaPOS application

- /application/package/Application/com/ibm/jpos/DemoPOSApp.jar (loads second)

Sample JavaPOS printer service

- /application/service/com/ibm/jpos/POSPrinterService.jar

- Loaded last (when opened by application)

Page 13: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Demo

Page 14: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JavaSystemFolder

Root Mount Pt. containing client config info

- Business card files identify software to configure

- JDDK-generated configuration archive files capture “software sets”

Automatically scanned by JDDK

- when no config archive files are present

- “-rescan” option is specified as startup param

- Result of scan is a named “software set” such as “current client configuration”

Mount pt. directory path passed as startup param (could even be on server)

Page 15: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

JavaSystemFolder

Identify software to configure

- System software (runs first)

- Application software (runs after system software)

Identify software sets

- Collection of business cards

- Auto-generated as result of scan

Each client references a JavaSystemFolder

- Duplicated for each client OR

- Shared on server

Page 16: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc
Page 17: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

LAN Client Configuration

Client

Server

Client

Sharing the Server’sJavaSystemFolder

IntranetClients

Page 18: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Thin Client (WAN or LAN)

Client

Server

Synchronization with Server’sJavaSystemFolder

Intranet ORInternetClients

Page 19: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Software Business Cards

Identifies software bundles (JARs)

- Applications, Drivers, Services, Packages

Identifies software lifecycle classes

- PackageInstance and ServiceInstance interfaces

Parser plug-ins for HTML, Text, and XML (future)

Contents

- Standard portion including code URLs

- Optional custom portion to hold software configuration parameters

Page 20: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Business Cards Define Configuration Parameters

Standard parameters used by JSL

- Title (Displayed by admin toolset) and code/resource URLs

- Matching names and loading options

Loading Options

- Always load, load when matched to device, or lazy load (load when first used)

Custom property and attribute access

- JSD property api used to get / set values

- Attributes are special “meta-properties”

Page 21: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc
Page 22: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Business Card Definitions using the JDDK or JOS4B

JDDK uses a configuration grammar

- Read by a parser / compiler during startup

- Creates business card entries in JSD

- Grammar resides in files outside JARs

- Grammar is text, and edited using a text editor and/or browser

- Grammar can be embedded in HTML or XML

JavaOS For Business toolset uses beans within the application or service JAR to define Business cards

- Rest of code in JAR is the same

Page 23: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

4 JDDK Configuration Archive Files (Software Sets)

/archive/jsd/config directory

- System Services File

- System Packages File

- Application Services File

- Application Packages File

JPOS v1.3 is a system package

POS Printer Service is an application package

POS Demo Application is an application service (lazy load upon connection)

Page 24: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Config tree grammar overview

Keywords / Delimiters

Attributes

Entry name

Properties

Template name

Tree name

; “” : = [ ]

// and /* comments */

Description

Define attributes

Define a JSD entry

Define properties

Define template

Define config tree

Delimiters

Comments

Page 25: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Property & Attribute Values

Compiler Primitive Types

- Strings, booleans, bytes, chars, doubles, floats, ints, longs, and shorts

Arrays supported using ‘[ ]’ token

Boolean values are “true” or “false”

Number values use Java language syntax

Default type is unicode String with value in “ “

- myStringProperty = “this is a string”;

Page 26: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Property and Attribute Value Templates

Used to define property and attribute values NOT understood by config tree compiler

- NOT a string, boolean, or number

Template names class that understands how to construct this kind of object

BusinessCard template class supplied with JDDK

Extensible mechansim for application and driver developers much like beans

Page 27: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Business Card Template

Template javaos.javax.system.services.BusinessCard { … primitive values go in here }

Template compiled when JPS starts

Template can also be written or “de-compiled” upon JPS exit or under the control of the application

Page 28: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Java Driver Development Kit Summary

JDDK is at FCSc2, with “final” FCS in Summer 99

Runs on ANY OS that supports JDK 1.1.6

Uses ANY Java software toolset / Browser

Supports Comm API Version 2.0

Contains JSD, JSL, JSE, and many other core JOS4B OS components

Drivers that use Comm API to access device run in JDDK and JavaOS For Business

Page 29: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

Further Information

New Addison Wesley Longman Book

“Inside the JavaOS Operating System”

http://www.awl.com/

Sun web sites:

http://www.sun.com/javaos/business

http://java.sun.com/

Vertical market web sites:

http://www.javapos.com/

http://www.jxfs.com/

Page 30: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc

© Copyright 1998 Sun Microsystems, Inc., All rights reserved.

Sun, Sun Microsystems, the Sun logo, Java, JavaOS, Solaris, JavaOS for Business, JavaOS for Consumers, Java Dynamic Management Kit, PersonalJava, EmbeddedJava, Java Card, the Duke mascot, Java Foundation Classes (JFC), Java2D, Java Coffee Cup logo, JDK, JavaCheck, Java Filter, JDBC, Java virtual machine, JavaEngine, 100% Pure Java, JavaBeans, and The Network Is The Computer are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the United States and other countries.

All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.

Page 31: Java Device Driver Kit (JDDK) Tom Saulpaugh Sun Microsystems, Inc