java - Introduzione a un gruppo peer JXTA personalizzato

original title: "java - Getting started with a custom JXTA PeerGroup"


I have been working with JXTA 2.3 for the last year or so for a peer-to-peer computing platform I am developing. I am migrating to JXTA 2.5 and in the process I am trying to clean up a lot of my use of JXTA. For the most part, I approached JXTA with a just make it work attitude. I used it to jumpstart creating and managing my peer-to-peer overlay network and providing basic communication services. I would like to use it in a more JXTA way since I am making changes to move to 2.5 anyway.

My first step would be a basic creation of a custom PeerGroup. I see some new new mechanisms that are using the infrastructure of Java. Should I be listing a related PeerGroup implementing object here with a GUID in net.jxta.platform.Module? As I understand it, if I do this, when a group with a spec ID matching the GUID is encountered and joined or created it should automatically use the matching object. I should be able to just manually tie a PeerGroup object to the group but this new method using META-INF seems to be a lot easier to manage.

Does anyone have any pointers or examples of using this infrastructure for PeerGroup implementation? Also, some general information on the mechanism in Java would be helpful.

Ho lavorato con JXTA 2.3 per circa un anno fa per una piattaforma informatica peer-to-peer che sto sviluppando. Sto migrando su JXTA 2.5 e nel processo sto provando a ripulire molti dei miei ...

Questo è il riepilogo dopo la traduzione, se è necessario visualizzare la traduzione completa, fare clic sull'icona "traduci"

Tutte le risposte
  • Translate

    The stuff is known by its class name in the API: ServiceLoader. A Google search for ServiceLoader yields some information.

    I am not really familiar with it, but sometimes it's all about knowing the right search keywords.