com.perforce.p4java.server
Class ZeroconfHelper

java.lang.Object
  extended by com.perforce.p4java.server.ZeroconfHelper

public class ZeroconfHelper
extends Object

Class designed to help the server factory with zeroconf-based duties. Not intended for direct use by end-users; uses the JmDNS zeroconf package if it's available through the class loader. See the comments attached to ServerFactory.getZeroconfServers for a fuller explanation.


Field Summary
static String P4D_ZEROCONF_TYPE
          The zeroconf type string normally used to register Perforce servers.
static String ZEROCONF_CLASS_NAME
          The name of the class we first try to find for zeroconf services.
 
Constructor Summary
protected ZeroconfHelper()
          We don't want this usable outside the main P4Java server package.
 
Method Summary
protected  List<ZeroconfServerInfo> getZeroconfServers()
           
protected  boolean isZeroConfAvailable()
          Returns true if this instance of P4Java has a suitable zeroconf implementation available to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZEROCONF_CLASS_NAME

public static final String ZEROCONF_CLASS_NAME
The name of the class we first try to find for zeroconf services.

See Also:
Constant Field Values

P4D_ZEROCONF_TYPE

public static String P4D_ZEROCONF_TYPE
The zeroconf type string normally used to register Perforce servers.

Constructor Detail

ZeroconfHelper

protected ZeroconfHelper()
We don't want this usable outside the main P4Java server package.

Method Detail

isZeroConfAvailable

protected boolean isZeroConfAvailable()
Returns true if this instance of P4Java has a suitable zeroconf implementation available to it. Should probably be used at least once before calling the getZeroConfServers method to avoid unnecessary overhead.

Returns:
true iff zeroconf services are available to the server factory.

getZeroconfServers

protected List<ZeroconfServerInfo> getZeroconfServers()
                                               throws ConfigException
Throws:
ConfigException


Copyright © 2011 Perforce Software. All Rights Reserved.