JXTA Java™ Standard Edition V2.5: Programmers Guide September

JXTA Java™ Standard Edition V2.5: Programmers Guide September

JXTA Java™ Standard Edition v2.5: Programmers Guide September 10th, 2007 JXSE 2.5 Programmers Guide : 1 © 2002-2007 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun Logo, and Java 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. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. Please Recycle JXSE 2.5 Programmers Guide : 2 Table of Contents Introduction................................................................................................7 Why JXTA™ ?...........................................................................................7 What is JXTA™ Technology?....................................................................8 What can be done with JXTA™ Technology? ..........................................8 Where to get JXTA™ technology.............................................................9 Getting Involved......................................................................................9 JXTA™ Architecture..................................................................................10 Overview...............................................................................................10 JXTA Components..................................................................................11 Key Aspects of the JXTA Architecture...................................................11 JXTA Concepts...........................................................................................12 Peers......................................................................................................12 Peer Groups...........................................................................................12 Network Services..................................................................................13 Peer Group Services..............................................................................13 Messages...............................................................................................15 Pipes......................................................................................................16 JxtaSocket and JxtaBiDiPipe.................................................................17 Advertisements......................................................................................19 Security.................................................................................................20 IDs.........................................................................................................21 Network Architecture...............................................................................22 Network Organization...........................................................................22 Shared Resource Distributed Index (SRDI)..........................................23 Queries..............................................................................................23 Firewalls and NAT.................................................................................26 JXTA Protocols...........................................................................................27 Peer Discovery Protocol........................................................................28 Peer Information Protocol.....................................................................28 Peer Resolver Protocol..........................................................................28 Pipe Binding Protocol............................................................................29 Endpoint Routing Protocol....................................................................29 Rendezvous Protocol.............................................................................30 The Basics.................................................................................................31 Getting Started......................................................................................31 Accessing On-line Documentation .......................................................31 Downloading Binaries...........................................................................31 Downloading Binaries...........................................................................31 Compiling JXTA Code............................................................................31 Running JXTA Applications...................................................................32 "Public JXTA Network" Configuration Setting......................................33 JXTA and HTTP Proxies ....................................................................33 JXSE 2.5 Programmers Guide : 3 Do I need a Proxy? ............................................................................33 Creating various ID types.....................................................................34 ID Tutorial source code.....................................................................35 Advertisements......................................................................................38 Advertisement Tutorial source..........................................................39 Messages and Message Elements.........................................................47 Design points for JXTA Messages......................................................47 Design points for Message Elements................................................48 Message and Message Element tutorial source................................49 Programming with JXTA...........................................................................56 HelloWorld Example..........................................................................56 Running the HelloWorld Example.....................................................56 Source Code: HelloWorld..................................................................57 Working with Local Configuration Example......................................58 Running the WorkingWithLocalConfiguration Example....................58 Pitfalls................................................................................................58 Source Code: WorkingWithLocalConfiguration................................59 Peer Discovery..........................................................................................62 Discovery Service..................................................................................62 DiscoveryClient.....................................................................................63 Source Code: DiscoveryClient...............................................................65 Source Code: DiscoveryServer..............................................................68 Membership Service.................................................................................71 Role of the Membership Service...........................................................71 Membership Service and Credentials...................................................71 Local Credentials and Remote Credentials...........................................71 Membership Services and Peer Groups................................................71 Membership Service and Other Services..............................................71 Membership Service Basic Operation ..................................................72 Remote Credentials & Access Control..................................................75 PSE Membership Service.........................................................................77 Introduction...........................................................................................77 The PSE Membership Service and Other Services...............................77 The PSE Membership Service and Keystores.......................................77 Accessing the PSE Membership Service...............................................77 PSE Membership Service Components.................................................77 PSE Membership First Steps................................................................77 The PSE Credential...............................................................................78 PSE Config............................................................................................78 Pipe Service..............................................................................................81 JXTA Pipe Service..................................................................................81 PipeServer.............................................................................................82 Source Code: PipeClient.......................................................................84 Source Code: PipeServer......................................................................86 Multicast Socket.......................................................................................90 Description............................................................................................90 JXSE 2.5 Programmers Guide : 4 Learning goals.......................................................................................90 Basic Operations...................................................................................90 Caveats..................................................................................................90

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    171 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us