`
`1
`
`Samsung v. IXI
`IPR2015-01444
`Exhibit 1016
`
`
`
`A Programmer’s Guide to
`Jini“ Technology
`
`IAN NEWMARCH
`
`APress Media, LLC
`
`libdocdel@fr.com
`
`2
`
`
`
`A Programmer’s Guide to IiniT"" Technology
`
`Copyright ©2000 by Ian Newrnarch
`Originally published by Apress in 2000
`
`All rights reserved. No part of this work may be reproduced or transmitted in any form or by any
`means, electronic or mechanical. including photocopying, recording, or by any information
`storage or retrieval system, without the prior written permission of the copyright owner and the
`publisher.
`
`ISBN 978' 1-893 1 15804
`DO] 10.1007.-‘Q78-1-4302-08600
`
`ISBN 978' 1-4302-0360-0 (eBool-I)
`
`Trademarked names may appear in this book. Rather than use a trademark symbol with every
`occurrence of a trademarked name, we use the names onlyin an editorial fashion and to the
`benefit of the trademark owner. with no intention of infringement of the trademark.
`
`Editorial Directors: Dan Ap picman, Gary Cornell. Karen Watterson
`
`Editor: Andy Carroll
`Production Editor: Kari Brooks
`
`Page Composition: Tony Ionick—Rappid Rabbit
`
`Artist: Karl Miyajima
`indexer: Carol Burbo
`
`Cover: Karl Miyajima
`
`The information in this book is distributed on an “as is" basis. without warranty. Although every
`precaution has been taken in the preparation of this work, neither the author not Apress shall
`have any liability to any person or entity with respect to any loss or damage caused or alleged to
`be caused directly or indirectly by the information contained in this work.
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`3
`
`
`
`Contents at a Glance
`
`Introduction ................................................................................................... ..xu:
`
`Chapter 1 Overview of Jini ...................................................................... ..1
`
`Chapter 2 Troubleshooting Jini
`Configuration Problems .......................................................................... ..17
`
`Chapter 3 Discovering a Lookup Service .............................................23
`
`Chapter 4 Entry Objects ........................................................................... ..43
`
`Chapter 5 Service Registration ............................................................ ..49
`
`Chapter 6 Client Search .............................................................................57
`
`Chapter 7 Leasing ....................................................................................... ..63
`
`Chapter 8 A Simple Example ......................................................................83
`
`Chapter 9 Choices for Service Architecture ................................. ..109
`
`Chapter 10 Discovery Management ........................................................ ..153
`
`Chapter 11
`
`Join Manager ......................................................................... ..161
`
`Chapter 12 Security ...................................................................................169
`
`Chapter 13 More Complex Examples ...................................................... ..193
`
`Chapter 14 Remote Event ......................................................................... ..235
`
`Chapter 15 $erviceDiscoveryManager....................................................255
`
`Chapter 16 Transaction ........................................................................... ..271
`
`Chapter 17
`
`LEGO MINDSTORMS .................................................................. .. 295
`
`Chapter 18
`
`CORBA and Jini ..................................................................... ..323
`
`Chapter 19 User Interfaces for Jini Services .................. .............355
`
`Chapter 20 Activation ...............................................................................393
`
`Index .................................................................................................................. "433
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`4
`
`iii
`
`4
`
`
`
`Contents
`
`Introduction ................................................................................................... “xm
`
`Chapter 1 Overview of Jini ................................................................4
`
`Jini ............................................................................................................................. "1
`
`Components ................................................................................................................ "2
`
`Service Registration .......................................................................................... "3
`
`Client Lookup ......................................................................................................... "5
`
`Proxies ...................................................................................................................... "7
`
`Client Structure .................................................................................................. "8
`
`Server Structure ................................................................................................ "10
`
`Partitioning an Application ........................................................................ "11
`
`Support Services ................................................................................................ "13
`
`HTTP Server ...................................................................................................... ..13
`
`RMI Daemon ..................................................................................................... ..15
`
`Summary ...................................................................................................................."15
`
`Chapter 2 Troubleshooting Jini
`Configuration Problems ............................................."17
`
`Java Packages ....................................................................................................... "17
`
`Jini Versions ....................................................................................................... "18
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`5
`
`5
`
`
`
`Contents
`
`Jini Packages ....................................................................................................... "19
`
`Lookup Service ..................................................................................................... "20
`
`RMI Stubs ................................................................................................................ "20
`
`Debugging ................................................................................................................ "22
`
`Summary .................................................................................................................... H22
`
`Chapter 3 Discovering a Lookup Service .............................. ..23
`
`Running a Lookup Service ............................................................................... "23
`
`Reggie ................................................................................................................. ..23
`
`rmid and IDK 1.3 ............................................................................................... ..26
`
`Unicast Discovery............................................................................................... "26
`
`LookupLocator .................................................................................................. ..27
`
`InvalidLookupLocat0r....................................................................................... ..27
`
`Running the InvalidLookupLocator ................................................................ ..29
`
`Information from the LookupLocator ............................................................. ..29
`
`getRegistrar ........................................................................................................ ..30
`
`Running the UnicastRegister ............................................................................ ..32
`
`Broadcast Discovery .......................................................................................... "32
`
`Groups ................................................................................................................ ..33
`
`LookupDiscovery............................................................................................... ..35‘
`
`DiscoveryListener .............................................................................................. ..34
`
`DiscoveryEvent .................................................................................................. ..35
`
`Staying Alive ....................................................................................................... ..37
`
`Running the MulticastRegister ......................................................................... ..38
`
`Broadcast Range ................................................................................................ ..39
`
`$erviceRegistrar ................................................................................................. "39
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`6
`
`6
`
`
`
`Contents
`
`Information from the ServiceRegistrar ........................................................... .. 41
`
`Summary .................................................................................................................... "42
`
`Chapter 4 Entry Objects ....................................................................... 43
`
`Entry Class ........................................................................................................... "43
`
`Attribute Matching Mechanism ....................................................................... .. 45
`
`Restrictions on Entries ................................................................................. "46
`
`Convenience Classes .......................................................................................... "46
`
`Further Uses of Entries ................................................................................. "47
`
`Summary .................................................................................................................... "48
`
`Chapter 5 Service Registration ................................................... .. 49
`
`ServiceRegistrar ................................................................................................ "49
`
`ServiceItem ........................................................................................................... "49
`
`Registration ......................................................................................................... "51
`
`ServiceRegistration .......................................................................................... "51
`
`The Simpleservice Program ............................................................................. "52
`
`Running the Simpleservice .............................................................................. .. 53
`
`Information from the ServiceRegistration ...................................................... .. 54
`
`Service ID ........................................................................................................... .. 54
`
`Entries .................................................................................................................... "55
`
`Summary .................................................................................................................... "55
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`7
`
`Vii
`
`7
`
`
`
`Contents
`
`Chapter 6 Client Search ..................................................................... ..57
`
`Searching for Services with the ServiceRegistrar ..........................."57
`
`Receiving the ServiceMatches Object ....................................................... "60
`
`Matching Services ............................................................................................... "61
`
`Summary .................................................................................................................... "62
`
`Chapter 7 Leasing..................................................................................... ..63
`
`Requesting and Receiving Leases ................................................................ "63
`
`Cancellation ....................................................................................................... ..65
`
`Expiration ........................................................................................................... ..65
`
`Renewing Leases ................................................................................................... "65
`
`Granting and Handling Leases ....................................................................... "66
`
`Abstract Lease .................................................................................................... ..6 7
`
`Landlord Lease Package .................................................................................... ..68
`
`Summary .................................................................................................................... "81
`
`Chapter 8
`
`A Simple Example ............................................................. ..83
`
`Problem Description .......................................................................................... "83
`
`Service Specification ...................................................................................... "86
`
`Common Classes ..................................................................................................... "87
`
`MIMEType ......................................................................................................... ..87
`
`Fi1eClassifier Interface ...................................................................................... ..89
`
`The Client .............................................................................................................. _90
`
`viii
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`8
`
`8
`
`
`
`Contents
`
`Unicast Client .................................................................................................... .. 90
`
`Multicast Client ................................................................................................. .. 94
`
`Exception Handling .......................................................................................... .. 96
`
`The Service Proxy .............................................................................................. .. 97
`
`Uploading a Complete Service ...................................................................... ..98
`
`Fileclassifier Implementation ......................................................................... .. 99
`
`FileClassifierServer Implementation ............................................................... .. 99
`
`Client Implementation ................................................................................... .. 104
`
`What Classes Need to Be Where? ................................................................... .. 104
`
`Running the FileClassifier .............................................................................. .. 1 06
`
`Summary .................................................................................................................. .. 1 07
`
`Chapter 9 Choices for Service Archi tecture .................. .. 109
`
`Proxy Choices ..................................................................................................... ..109
`
`Proxy Is the Service ......................................................................................... .. 109
`
`RMI Proxy ........................................................................................................ .. 1 I 0
`
`Non-RMI Proxy................................................................................................ ..112
`
`RMI and Non—RMI Proxies ............................................................................. .. 1 14
`
`RMI Proxy for Fileclassifier .................................................................... .. 115
`
`What Doesn't Change ..................................................................................... .. 1 15
`
`RemoteFileClassifier ....................................................................................... .. 1 1 6
`
`FileClassifierImpl ............................................................................................ .. 1 1 6
`
`FileClassifierServer.......................................................................................... .. 11 7
`
`What Classes Need to Be Where? ................................................................... .. 120
`
`Running the RMI Proxy FileC1assifier............................................................ .. 122
`
`Non -RMI Proxy for Fi1eClassifier ........................................................... ..123
`
`FileClassifierProxy ........................................................................................... .. 124
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`9
`
`9
`
`
`
`Contents
`
`Fileserverlmpl ................................................................................................. ..126
`
`Service Provider ............................................................................................... ..128
`
`What Classes Need to Be Where? ................................................................... ..131
`
`Running the RMI Proxy FileClassifier ........................................................... ..132
`
`RMI and non-RMI Proxies for Fileclassifier ...................................... ..133
`
`FileC1assif1erProxy ........................................................................................... ..133
`
`ExtendedFileC1assifier .................................................................................... ..134
`
`ExtendedFileClassifierIn1pl ............................................................................ ..135
`
`Fi1eClassifierSerVer .......................................................................................... ..137
`
`What Classes Need to Be Where? ................................................................... ..139
`
`Using Other Services ...................................................................................... ..140
`
`Heart Interface ................................................................................................. ..142
`
`Heartserver ...................................................................................................... ..142
`
`Heartclient ....................................................................................................... ..145
`
`Heart Implementation .................................................................................... ..147
`
`Summary .................................................................................................................. ..152
`
`Chapter 10 Discovery Management ...................................................153
`
`Finding Lookup Locators ............................................................................... ..153
`
`LookupLocatorDiscovery.................................................................................. ..155
`
`LookupDiscoveryManager.................................................................................. ..157
`
`Summary .................................................................................................................. ..159
`
`Chapter 11 Join Manager........................................................................161
`
`Jini 1.1 JoinManager ...................................................................................... ..161
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`10
`
`10
`
`
`
`Contents
`
`Jini 1.0 JoinManager ...................................................................................... ..163
`
`Getting Information from IoinManager ........................................................ .. 166
`
`Summary .................................................................................................................. .. 167
`
`Chapter 12 Security................................................................................ ..169
`
`Getting Going with No Security ................................................................ "169
`
`why Al1Permission Is Bad ............................................................................. "170
`
`Removing A11Permission ................................................................................. "172
`
`Jini with Protection ...................................................................................... "173
`
`Service Requirements ...................................................................................... "174
`
`Client Requirements ........................................................................................ "176
`
`RMI Parameters ................................................................................................... "178
`
`ServiceRegistrar .............................................................................................. "179
`
`Transaction Manager and Other Activatable Services .................... "180
`
`rmid ......................................................................................................................... .. 182
`
`rmid and IDK 1.3 ............................................................................................. ..183
`
`Being Paranoiac ................................................................................................. ..186
`
`Protection Domains ........................................................................................ .. 1 86
`
`Signing Standard Files .................................................................................... .. 187
`
`Signing Other Services .................................................................................... .. 188
`
`Permissions ....................................................................................................... .. 88
`
`Putting It Together .......................................................................................... .. 189
`
`Summary .................................................................................................................. "191
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`11
`
`11
`
`
`
`Contents
`
`Chapter 13 More Complex Examples ................................................193
`
`where Are the Class Files? ......................................................................... "193
`
`Problem Domain ............................................................................................. ..193
`
`NameEntry Interface ....................................................................................... .. 1 95
`
`Naive Implementation .................................................................................... ..196
`
`Factory Implementation ................................................................................. ..199
`
`Using Multiple Class Files ............................................................................... ..201
`
`Running Threads from Discovery ................................................................ "204
`
`Server Threads ................................................................................................. ..204
`
`Join Manager Threads ..................................................................................... ..207
`
`Client Threads .................................................................................................. ..207
`
`Inexact Service Matching ............................................................................. "209
`
`Matching Using Local Services .................................................................. "213
`
`Finding a Service Once Only....................................................................... "221
`
`Leasing Changes to a Service..................................................................... "225
`
`Leased FileClassifier ........................................................................................ ..226
`
`The FileClassifierLeasedResource Class ........................................................ ..228
`
`The FileClassifierLeaseManager Class ........................................................... ..229
`
`The FileClassifierLandlord Class .................................................................... ..231
`
`Summary .................................................................................................................. "233
`
`Chapter 14 Remote Events .....................................................................235
`
`Event Models ........................................................................................................ "235
`
`Remote Events ..................................................................................................... "236
`
`Event Registration .......................................................................................... "238
`
`xii
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`12
`
`12
`
`
`
`Contents
`
`Listener List ..................................................................................................... "239
`
`Single Listener ................................................................................................. .. 239
`
`Multiple Listeners .......................................................................................... ..241
`
`Listener Source ................................................................................................. "242
`
`File Classifier with Events ...................................................................... "244
`
`Monitoring Changes in Services ................................................................ "249
`
`Summary .................................................................................................................. "254
`
`Chapter 15 ServiceDiscoveryManager ...........................................255
`
`ServiceDiscoveryManager Interface ......................................................... "255
`
`ServiceItemFilter Interface ...................................................................... "256
`
`Finding a Service Immediately .................................................................. "257
`
`Using a Filter ................................................................................................... "259
`
`Building a Cache of Services .................................................................... "262
`
`Running the CachedClientLookup ................................................................ .. 265
`
`Monitoring Changes to the Cache .............................................................. "266
`
`Summary .................................................................................................................. "269
`
`Chapter 16 Transactions ..................................................................... ..271
`
`Transaction Identifiers ............................................................................... "271
`
`TransactionManager .......................................................................................... "272
`
`TransactionParticipant ................................................................................. ..273
`
`Mahalo .................................................................................................................... "273
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`13
`
`xiii
`
`13
`
`
`
`Contents
`
`A Transaction Example .................................................................................... "274
`
`Payab1eFileC1assifier1mp1 ............................................................................... ..276
`
`Accountslmpl ................................................................................................... ..282
`
`Client ................................................................................................................ ..287
`
`Summary .................................................................................................................. "294
`
`Chapter 17 LEGO MINDSTORMS .............................................................. .295
`
`Making Hardware into Jini Services ....................................................... "295
`
`MINDSTORMS ............................................................................................................ "296
`
`MINDSTORMS as a Jini Service ..................................................................... "296
`
`RCXPort .................................................................................................................. "297
`
`RCX Programs ........................................................................................................ "299
`
`Jini Classes ........................................................................................................ "301
`
`Getting It Running .......................................................................................... "307
`
`Entry Objects for a Robot ........................................................................... "315
`
`A Client-Side RCX Class ............................................................................... "316
`
`Higher—Level Mechanisms: Not Quite C ................................................... "317
`
`Summary .................................................................................................................. "322
`
`Chapter 18 CORBA and Jini ................................................................ ..323
`
`CORBA ....................................................................................................................... "323
`
`CORBA to Java Mapping .................................................................................... "325
`
`Jini Proxies ........................................................................................................ "326
`
`xiv
`
`HbdocdeH@fLcon1
`libdocdel@fr.com
`
`14
`
`14
`
`
`
`Contents
`
`A Simple CORBA Example ................................................................................. ..328
`
`CORBA Server in Java ..................................................................................... .. 328
`
`CORBA Client in Iava ...................................................................................... .. 330
`
`Iini Service ....................................................................................................... .. 331
`
`Iini Server and Client ...................................................................................... .. 334
`
`Building the Simple CORBA Example ........................................................... .. 334
`
`Running the Simple CORBA Example ........................................................... .. 335
`
`CORBA Implementations ............................................................................... .. 335
`
`Room-Booking Example ...................................................................................... "336
`
`CORBA Objects ................................................................................................ .. 337
`
`Multiple Objects .............................................................................................. .. 340
`
`Exceptions ........................................................................................................ .. 344
`
`Interfaces for Single Thin Proxy ..................................................................... .. 345
`
`RoomBookingBridge Implementation .......................................................... .. 347
`
`Other Classes ................................................................................................... .. 351
`
`Building the Room-Booking Example ........................................................... .. 352
`
`Running the Room—Booking Example ........................................................... .. 352
`
`Migrating a CORBA Client to Jini ........................................................... H353
`
`Jini Service as a CORBA Service .............................................................. .. 354
`
`Summary .................................................................................................................. .. 354
`
`Chapter 19 User Interfaces for Jini Services ............... .. 355
`
`User Interfaces as Entries ......................................................................... .. 355
`
`Us er Interfaces from Factory Objects ................................................... .. 356
`
`Current Factories ............................................................................................ ..358
`
`Marshalling Factories .................................................................................... .. 358
`
`|ibdocde|@fr.com
`libdocdel@fr.com
`
`15
`
`XV
`
`15
`
`
`
`Contents
`
`UIDes criptor........................................................................................................ ..360
`
`Toolkit .............................................................................................................. ..360
`
`Role