|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.peergroup.NetPeerGroupFactory
public final class NetPeerGroupFactory
A factory for instantiating a Network Peer Group instances. The Network Peer Group is the base peer group for applications and services within the JXTA network. Most applications and services will instantiate their own peer groups using the Network Peer Group as a base.
A non-default configuration of The Network Peer Group may be set-up by the administrator in charge of the network domain inside which the peer is starting. The Network Peer Group may be discovered via the JXTA Discovery protocol. Many such groups may be configured by an administrator.
PeerGroup
,
WorldPeerGroupFactory
Constructor Summary | |
---|---|
NetPeerGroupFactory()
Instantiates the Net Peer Group using the ConfigParams found in the directory specified by the JXTA_HOME system property or the
".jxta/ " directory if JXTA_HOME is not defined. |
|
NetPeerGroupFactory(ConfigParams config,
URI storeHome)
Constructs a Net Peer Group and the World Peer Group using the configuration specified by the provided ConfigParams and using the specified storeHome location for persistence. |
|
NetPeerGroupFactory(ConfigParams config,
URI storeHome,
ID id,
String name,
XMLElement desc)
Deprecated. With the addition of support for PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous. |
|
NetPeerGroupFactory(PeerGroup parentGroup)
Constructs a Net Peer Group using the specified parent peer group. |
|
NetPeerGroupFactory(PeerGroup parentGroup,
ConfigParams config,
ModuleImplAdvertisement moduleImplAdv)
Constructs a Net Peer Group instance using the specified parent peer group (normally the World Peer Group). |
|
NetPeerGroupFactory(PeerGroup parentGroup,
ConfigParams config,
URI storeHome)
Constructs a Net Peer Group and the World Peer Group using the configuration specified by the provided ConfigParams and using the specified storeHome location for persistence. |
|
NetPeerGroupFactory(PeerGroup parentGroup,
ID id,
String name,
XMLElement desc)
Deprecated. With the addition of support for PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous. |
|
NetPeerGroupFactory(PeerGroup parentGroup,
ID id,
String name,
XMLElement desc,
ModuleImplAdvertisement moduleImplAdv)
Deprecated. With the addition of support for PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous. |
Method Summary | |
---|---|
PeerGroup |
getInterface()
Returns a strong (reference counted) interface object for the Net Peer Group instance. |
PeerGroup |
getWeakInterface()
Returns a weak (non-reference counted) interface object for the Net Peer Group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetPeerGroupFactory() throws PeerGroupException
JXTA_HOME
system property or the
".jxta/
" directory if JXTA_HOME
is not defined.
This constructor is provided primarily for backwards compatibility.
Though not deprecated this method should be considered as sample code
only and the other constructors should be used whenever possible.
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.public NetPeerGroupFactory(PeerGroup parentGroup) throws PeerGroupException
parentGroup
- The Peer Group which will be the parent of the newly
created net peer group. This should normally be the World Peer Group.
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.public NetPeerGroupFactory(ConfigParams config, URI storeHome) throws PeerGroupException
config
- The configuration to use for the newly created World Peer
Group and Net Peer Groups.storeHome
- The optional location that the World Peer Group, the
Net Peer Group and its' services should use for storing persistent and
transient information. May be null
if the World Peer Group is
not provided a persistent store (though this not currently supported).
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.public NetPeerGroupFactory(PeerGroup parentGroup, ConfigParams config, URI storeHome) throws PeerGroupException
config
- The configuration to use for the newly created World Peer
Group and Net Peer Groups.storeHome
- The optional location that the World Peer Group, the
Net Peer Group and its' services should use for storing persistent and
transient information. May be null
if the World Peer Group is
not provided a persistent store (though this not currently supported).parentGroup
- the parent peer group
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.@Deprecated public NetPeerGroupFactory(ConfigParams config, URI storeHome, ID id, String name, XMLElement desc) throws PeerGroupException
PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous.
config
- The configuration to use for the newly created World Peer
Group and Net Peer Groups.storeHome
- The optional location that the World Peer Group, the
Net Peer Group and its' services should use for storing persistent and
transient information. May be null
if the World Peer Group is
not provided a persistent store (though this not currently supported).id
- The PeerGroupID which will be used for the new Net Peer Group
instance.name
- The name which will be used for the new Net Peer Group
instance.desc
- The description which will be used for the new Net Peer Group
instance. You can construct an XMLDocument
from a String
via :
XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.@Deprecated public NetPeerGroupFactory(PeerGroup parentGroup, ID id, String name, XMLElement desc) throws PeerGroupException
PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous.
parentGroup
- The Peer Group which will be the parent of the
newly created net peer group. This should normally be the World Peer
Group.id
- The PeerGroupID which will be used for the new Net Peer Group
instance.name
- The name which will be used for the new Net Peer Group
instance.desc
- The description which will be used for the new Net Peer Group
instance. You can construct an XMLDocument
from a String
via :
XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.@Deprecated public NetPeerGroupFactory(PeerGroup parentGroup, ID id, String name, XMLElement desc, ModuleImplAdvertisement moduleImplAdv) throws PeerGroupException
PeerGroupConfigAdv
this constructor is being deprecated as the precedence of settings is
ambiguous.
parentGroup
- The Peer Group which will be the parent of the newly
created net peer group. This should normally be the World Peerid
- The PeerGroupID which will be used for the new Net Peer Group
instance.name
- The name which will be used for the new Net Peer Group
instance.desc
- The description which will be used for the new Net Peer Group
instance. You can construct an XMLDocument
from a String
via :
XMLDocument asDoc = StructuredDocumentFactory.newStructuredDocument( MimeMediaType.XMLUTF8, "desc", asString );
moduleImplAdv
- The Module Impl Advertisement for the new Net Peer
Group instance.
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.public NetPeerGroupFactory(PeerGroup parentGroup, ConfigParams config, ModuleImplAdvertisement moduleImplAdv) throws PeerGroupException
parentGroup
- The Peer Group which will be the parent of the
newly created net peer group. This should normally be the World Peer
Group.config
- The configuration parameters for the newly created Net Peer
Group instance.moduleImplAdv
- The Module Impl Advertisement for the new Net Peer
Group instance.
PeerGroupException
- Thrown for problems constructing the Net Peer
Group.Method Detail |
---|
public PeerGroup getInterface()
PeerGroup.unref()
public PeerGroup getWeakInterface()
PeerGroup.getWeakInterface()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |