2. Architecture
 Prev    Next

2: The JP2P Container

2.1. The JP2P container

It may seem  from the previous that the JP2P container is a very complicated bit of code, like the J2EE containers, but actually the container is very simple; it is little more than a collection of JP2P components, which implement the net.jp2p.IJp2pComponent interface. In fact, the container itself implements this interface!  JP2P components come in three flavours:

  1. Component: the simplest instance, which is basically a wrapper around a POJO
  2. ComponentNode: as above, but which can have child nodes
  3. JP2P Service: a stateful node that can be started, stopped and paused.

Take for instance a Component node that wraps the NetworkManager of JXTATM.You may be tempted to think that this is implemented as a JP2P service-because in JXTATM we use the Network Manager to start and stop the network, but it actually is divided over three distinct JP2P components:

  • The NetworkManager component node
  • The NetworkConfigurator child node
  • The Netpeergroup service, which actually starts and stops the network

When you start the RDV template project, you will see these services appear in the JP2P navigator.

As a result, the JP2P container is therefore not a linear transformation of JXTATM functionality, but in general it should not be too difficult to see the relationship between them.

 Prev
 Next
Chaupal User Guide  Home  2.3 The Chaupal JP2P Component Builder

Hosted on GitHub Pages � Theme by orderedlist