p2ps.imp.peer.config
Class DefaultConfig
java.lang.Object
p2ps.imp.peer.config.DefaultConfig
- All Implemented Interfaces:
- Config
- public class DefaultConfig
- extends java.lang.Object
- implements Config
The default configuration for a p2ps peer.
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DISCOVERY_SERVICE_CLASS
public static final java.lang.String DISCOVERY_SERVICE_CLASS
- See Also:
- Constant Field Values
PIPE_SERVICE_CLASS
public static final java.lang.String PIPE_SERVICE_CLASS
- See Also:
- Constant Field Values
RENDEZVOUS_SERVICE_CLASS
public static final java.lang.String RENDEZVOUS_SERVICE_CLASS
- See Also:
- Constant Field Values
GROUP_SERVICE_CLASS
public static final java.lang.String GROUP_SERVICE_CLASS
- See Also:
- Constant Field Values
PEER_FACTORY_CLASS
public static final java.lang.String PEER_FACTORY_CLASS
- See Also:
- Constant Field Values
ID_FACTORY_CLASS
public static final java.lang.String ID_FACTORY_CLASS
- See Also:
- Constant Field Values
NETWORK_INTERFACE_CLASS
public static final java.lang.String NETWORK_INTERFACE_CLASS
- See Also:
- Constant Field Values
DefaultConfig
public DefaultConfig()
getDefaultAdvertInstantiatorConfigs
public static final InstantiatorConfig[] getDefaultAdvertInstantiatorConfigs()
setResolverConfig
public void setResolverConfig(ResolverConfig[] resconfigs)
getKeyStore
public java.lang.String getKeyStore()
- Specified by:
getKeyStore in interface Config
- Returns:
- the keystore location (or null if not applicable)
getKeyAlias
public java.lang.String getKeyAlias()
- Specified by:
getKeyAlias in interface Config
- Returns:
- the alias of the certificate key for this peer (or null if not
applicable)
isKeyStoreTemporary
public boolean isKeyStoreTemporary()
- Specified by:
isKeyStoreTemporary in interface Config
- Returns:
- true if the key store is temporary for the lifetime of the peer
getIdentity
public Identity getIdentity()
- Specified by:
getIdentity in interface Config
- Returns:
- the identity for this peer (ignored if keystore is specified)
getClientSecurityLevel
public java.lang.String getClientSecurityLevel()
- Specified by:
getClientSecurityLevel in interface Config
- Returns:
- the client security level
getServerSecurityLevel
public java.lang.String getServerSecurityLevel()
- Specified by:
getServerSecurityLevel in interface Config
- Returns:
- the server security level
getDiscoveryServiceClass
public java.lang.String getDiscoveryServiceClass()
- Specified by:
getDiscoveryServiceClass in interface Config
- Returns:
- the class of the discovery service
getPipeServiceClass
public java.lang.String getPipeServiceClass()
- Specified by:
getPipeServiceClass in interface Config
- Returns:
- the class of the pipe service
getRendezvousServiceClass
public java.lang.String getRendezvousServiceClass()
- Specified by:
getRendezvousServiceClass in interface Config
- Returns:
- the class of the rendezvous service
getGroupServiceClass
public java.lang.String getGroupServiceClass()
- Specified by:
getGroupServiceClass in interface Config
- Returns:
- the class of the group service
getPeerFactoryClass
public java.lang.String getPeerFactoryClass()
- Specified by:
getPeerFactoryClass in interface Config
- Returns:
- the class of the peer factory
getIDFactoryClass
public java.lang.String getIDFactoryClass()
- Specified by:
getIDFactoryClass in interface Config
- Returns:
- the class of the id factory
getNetworkInterfaceClass
public java.lang.String getNetworkInterfaceClass()
- Specified by:
getNetworkInterfaceClass in interface Config
- Returns:
- the class of the network interface factory
getAdvertInstantiatorConfigs
public InstantiatorConfig[] getAdvertInstantiatorConfigs()
- Specified by:
getAdvertInstantiatorConfigs in interface Config
- Returns:
- an array of configs for the advertisement instantiators
getRendezvousRequirement
public Config.RendezvousRequirement getRendezvousRequirement()
- Specified by:
getRendezvousRequirement in interface Config
- Returns:
- either RENDEZVOUS_ALWAYS, RENDEZVOUS_IF_REQUIRED or RENDEZVOUS_NEVER
getLocalRendezvousEndpoints
public java.net.URI[] getLocalRendezvousEndpoints()
- Specified by:
getLocalRendezvousEndpoints in interface Config
- Returns:
- an array of the local rendezvous endpoints
getRemoteRendezvousEndpoints
public java.net.URI[] getRemoteRendezvousEndpoints()
- Specified by:
getRemoteRendezvousEndpoints in interface Config
- Returns:
- an array of the remote rendezvous endpoints that the rendezvous
service should connect to.
getResolverConfigs
public ResolverConfig[] getResolverConfigs()
- Specified by:
getResolverConfigs in interface Config
- Returns:
- a configuration using a UDP resolver for input, output and
discovery pipes
getResolverConfig
public ResolverConfig getResolverConfig(java.lang.String classname)
- Specified by:
getResolverConfig in interface Config
- Returns:
- the resolver config for the specified resolver class
getMinPort
public int getMinPort()
- Specified by:
getMinPort in interface Config
- Returns:
- the minimum available port number
getMaxPort
public int getMaxPort()
- Specified by:
getMaxPort in interface Config
- Returns:
- the maximum available port number
isPortRangeInputOnly
public boolean isPortRangeInputOnly()
- Specified by:
isPortRangeInputOnly in interface Config
- Returns:
- true if the port range applies for input only