com.perforce.p4java.impl.mapbased.server
Interface IServerControl

All Known Implementing Classes:
NtsServerImpl, OneShotServerImpl, RpcServer, Server

public interface IServerControl

The minimal control interface all IServer impl classes must implement.


Method Summary
 ServerStatus init(String host, int port, Properties props)
          Convenience method for init(host, port, props, null).
 ServerStatus init(String host, int port, Properties props, UsageOptions opts)
          Convenience method for init(host, port, props, opts, secure).
 ServerStatus init(String host, int port, Properties props, UsageOptions opts, boolean secure)
          Convenience method for init(host, port, props, opts, secure, null).
 ServerStatus init(String host, int port, Properties props, UsageOptions opts, boolean secure, String rsh)
          Initialize the server.
 

Method Detail

init

ServerStatus init(String host,
                  int port,
                  Properties props,
                  UsageOptions opts,
                  boolean secure,
                  String rsh)
                  throws ConfigException,
                         ConnectionException
Initialize the server. Called immediately after the server class is instantiated. The semantics of this method are fairly broad: the result of calling this method is that a future call to "normal" server calls must not fail because of any setting-up problems.

Parameters:
host - the Perforce server hostname or IP address as passed in to the factory method
port - the Perforce server port number as passed in to the factory method
props - the properties passed in to the factory method
opts - the UsageOptions object to be associated with the server object; if null, the server should construct a new default UsageOptions object.
secure - indicates whether the server is secure (SSL) or not.
rsh - the 'rsh' mode server launch command.
Returns:
the resulting status; should be ACTIVE unless otherwise specified
Throws:
ConfigException - if there's something wrong with the specified configuration or associated config files, etc.
ConnectionException - if the server is unreachable on initialization, and that unreachability is serious and unrecoverable (there are implementations that don't really do connections per se, so they may not consider this an error or even try connecting during initialisation).

init

ServerStatus init(String host,
                  int port,
                  Properties props,
                  UsageOptions opts,
                  boolean secure)
                  throws ConfigException,
                         ConnectionException
Convenience method for init(host, port, props, opts, secure, null). See init's main Javadoc for full documentation.

Parameters:
host - the Perforce server hostname or IP address as passed in to the factory method
port - the Perforce server port number as passed in to the factory method
props - the properties passed in to the factory method
opts - the UsageOptions object to be associated with the server object; if null, the server should construct a new default UsageOptions object.
Returns:
the resulting status; should be ACTIVE unless otherwise specified
Throws:
ConfigException - if there's something wrong with the specified configuration or associated config files, etc.
ConnectionException - if the server is unreachable on initialization, and that unreachability is serious and unrecoverable (there are implementations that don't really do connections per se, so they may not consider this an error or even try connecting during initialisation).

init

ServerStatus init(String host,
                  int port,
                  Properties props,
                  UsageOptions opts)
                  throws ConfigException,
                         ConnectionException
Convenience method for init(host, port, props, opts, secure). See init's main Javadoc for full documentation.

Parameters:
host - the Perforce server hostname or IP address as passed in to the factory method
port - the Perforce server port number as passed in to the factory method
props - the properties passed in to the factory method
opts - the UsageOptions object to be associated with the server object; if null, the server should construct a new default UsageOptions object.
Returns:
the resulting status; should be ACTIVE unless otherwise specified
Throws:
ConfigException - if there's something wrong with the specified configuration or associated config files, etc.
ConnectionException - if the server is unreachable on initialization, and that unreachability is serious and unrecoverable (there are implementations that don't really do connections per se, so they may not consider this an error or even try connecting during initialisation).

init

ServerStatus init(String host,
                  int port,
                  Properties props)
                  throws ConfigException,
                         ConnectionException
Convenience method for init(host, port, props, null). See init's main Javadoc for full documentation.

Parameters:
host - the Perforce server hostname or IP address as passed in to the factory method
port - the Perforce server port number as passed in to the factory method
opts - the UsageOptions object to be associated with the server object; if null, the server should construct a new default UsageOptions object.
Returns:
the resulting status; should be ACTIVE unless otherwise specified
Throws:
ConfigException - if there's something wrong with the specified configuration or associated config files, etc.
ConnectionException - if the server is unreachable on initialization, and that unreachability is serious and unrecoverable (there are implementations that don't really do connections per se, so they may not consider this an error or even try connecting during initialisation).


Copyright © 2015 Perforce Software. All Rights Reserved.