net.jxta.impl.peergroup
Class ShadowPeerGroup
java.lang.Object
net.jxta.impl.peergroup.GenericPeerGroup
net.jxta.impl.peergroup.StdPeerGroup
net.jxta.impl.peergroup.ShadowPeerGroup
- All Implemented Interfaces:
- CompatibilityEquater, Module, PeerGroup, Service
- public class ShadowPeerGroup
- extends StdPeerGroup
ShadowPeerGroup is almost a regular StdPeerGroup, except that it borrows its
parent's configuration. The only real use is for the netPeerGroup
Fields inherited from interface net.jxta.peergroup.PeerGroup |
accessClassID, allPurposePeerGroupSpecID, applicationClassID, Both, DEFAULT_EXPIRATION, DEFAULT_LIFETIME, discoveryClassID, endpointClassID, FromParent, globalRegistry, Here, httpProtoClassID, membershipClassID, peerGroupClassID, peerinfoClassID, pipeClassID, proxyClassID, refAccessSpecID, refDiscoverySpecID, refEndpointSpecID, refHttpProtoSpecID, refMembershipSpecID, refNetPeerGroupSpecID, refPeerinfoSpecID, refPipeSpecID, refPlatformSpecID, refProxySpecID, refRelayProtoSpecID, refRendezvousSpecID, refResolverSpecID, refRouterProtoSpecID, refShellSpecID, refStartNetPeerGroupSpecID, refTcpProtoSpecID, refTlsProtoSpecID, relayProtoClassID, rendezvousClassID, resolverClassID, routerProtoClassID, tcpProtoClassID, tlsProtoClassID, WK_ID_PREFIX |
Method Summary |
protected void |
initFirst(PeerGroup parent,
ID assignedID,
Advertisement impl)
Performs all initialization steps that need to be performed
before any subclass initialization is performed.
Classes that override this method should always call
super.initFirst() before doing
any of their own work.
This method loads and initializes all modules
described in the given implementation advertisement. Then, all modules
are placed in a list and the list is processed iteratively. During each
iteration, the Module.startApp(String[]) method of each module
is invoked once. Iterations continue until no progress is being made or
the list is empty.
The status returned by the Module.startApp(String[]) method
of each module is considered as follows:
Iterations through the list stop when:
- The list is empty: the group initialization proceeds.
- A complete iteration was performed and all modules returned
Module.START_AGAIN_STALLED : a PeerGroupException
is thrown.
- A number of complete iteration completed without any module
returning
Module.START_OK : a PeerGroupException
is thrown. The number of complete iterations before that happens is
computed as 1 + the square of the number of modules currently in the
list.
This implementation initializes the configuration advertisement with
that of the parent group and otherwise behave exactly like its
superclass. |
protected void |
initLast()
Perform all initialization steps that need to be performed
after any subclass initialization is performed.
Classes that override this method should always call super.initLast
after doing any of their own work. |
Methods inherited from class net.jxta.impl.peergroup.GenericPeerGroup |
addService, checkServices, decRefCount, equals, getAccessService, getConfigAdvertisement, getDiscoveryService, getEndpointService, getHomeThreadGroup, getImplAdvertisement, getInterface, getJxtaLoader, getLoader, getMembershipService, getParentGroup, getPeerAdvertisement, getPeerGroupAdvertisement, getPeerGroupID, getPeerGroupName, getPeerID, getPeerInfoService, getPeerName, getPipeService, getRendezVousService, getResolverService, getRoleMap, getWeakInterface, hashCode, init, isRendezvous, loadModule, loadModule, loadModule, loadModule, lookupService, lookupService, newGroup, newGroup, newGroup, publishGroup, removeService, setConfigAdvertisement, setJxtaLoader, unref |
Methods inherited from interface net.jxta.peergroup.PeerGroup |
|
ShadowPeerGroup
public ShadowPeerGroup()
initFirst
protected void initFirst(PeerGroup parent,
ID assignedID,
Advertisement impl)
throws PeerGroupException
- Performs all initialization steps that need to be performed
before any subclass initialization is performed.
Classes that override this method should always call
super.initFirst()
before doing
any of their own work.
This method loads and initializes all modules
described in the given implementation advertisement. Then, all modules
are placed in a list and the list is processed iteratively. During each
iteration, the Module.startApp(String[])
method of each module
is invoked once. Iterations continue until no progress is being made or
the list is empty.
The status returned by the Module.startApp(String[])
method
of each module is considered as follows:
Iterations through the list stop when:
- The list is empty: the group initialization proceeds.
- A complete iteration was performed and all modules returned
Module.START_AGAIN_STALLED
: a PeerGroupException
is thrown.
- A number of complete iteration completed without any module
returning
Module.START_OK
: a PeerGroupException
is thrown. The number of complete iterations before that happens is
computed as 1 + the square of the number of modules currently in the
list.
This implementation initializes the configuration advertisement with
that of the parent group and otherwise behave exactly like its
superclass.
- Overrides:
initFirst
in class StdPeerGroup
- Throws:
PeerGroupException
initLast
protected void initLast()
throws PeerGroupException
- Perform all initialization steps that need to be performed
after any subclass initialization is performed.
Classes that override this method should always call super.initLast
after doing any of their own work.
- Overrides:
initLast
in class StdPeerGroup
- Throws:
PeerGroupException