Interface IServerAddress

  • All Known Implementing Classes:
    ServerAddress

    public interface IServerAddress
    Provides a specification for identifying a Perforce server as a resource in a network. Usually, this means information needed for a Perforce client to communicate with the Perforce server.

    This specification has the familiarity of the standard Java URI. The protocol part specifies which network implementation to use and whether it is a secure (SSL) connection. The optional query string part can be used to set P4Java properties.

    
     The P4Java URI syntax:
     
     protocol://host:port?query
     
     protocol = p4java|p4javassl|p4jrpc|p4jrpcssl|p4jrpcnts|p4jrpcntsssl
     host = hostname|IP address
     port = [0-9]* (values 0 to 65535)
     query = string (i.e. key0=value0&key1=value1...)
     
     p4java - default protocol (same as p4jrpc)
     p4javassl - secure default protocol (same as p4jrpcssl)
     p4jrpc - one-shot (connection-per-command) RPC protocol implementation.
     p4jrpcssl - secure one-shot (connection-per-command) RPC protocol implementation.
     p4jrpcnts - non-thread-safe (multiple-commands-per-connection) RPC protocol implementation.
     p4jrpcntsssl - secure non-thread-safe (multiple-commands-per-connection) RPC protocol implementation.
     p4jrsh - run p4d in 'rsh' mode.
     
     P4Java URI Examples:
     
     p4java://myp4server:1777
     
     p4javassl://myp4server.xyz.com:1777?key0=value0&key1=value1
     
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  IServerAddress.Protocol
      Specifies the connection protocol
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getHost()
      Gets the IP address or hostname of the server.
      int getPort()
      Gets the port number of the server.
      java.util.Properties getProperties()
      Gets the properties parsed from the query component of the URI.
      IServerAddress.Protocol getProtocol()
      Gets the connection protocol.
      java.lang.String getQuery()
      Gets the query component of the URI.
      java.lang.String getRsh()
      Gets the command for running the server in 'rsh' mode.
      java.lang.String getUri()
      Gets the URI form of the associated address.
      boolean isSecure()
      Return true, if the protocol is secure.
    • Method Detail

      • isSecure

        boolean isSecure()
        Return true, if the protocol is secure.
        Returns:
        true/false
      • getUri

        java.lang.String getUri()
        Gets the URI form of the associated address.
        Returns:
        the uri
      • getProtocol

        IServerAddress.Protocol getProtocol()
        Gets the connection protocol.
        Returns:
        the connection protocol
      • getHost

        java.lang.String getHost()
        Gets the IP address or hostname of the server.
        Returns:
        the host
      • getPort

        int getPort()
        Gets the port number of the server.
        Returns:
        the port
      • getQuery

        java.lang.String getQuery()
        Gets the query component of the URI.
        Returns:
        the query
      • getProperties

        java.util.Properties getProperties()
        Gets the properties parsed from the query component of the URI.
        Returns:
        the properties
      • getRsh

        java.lang.String getRsh()
        Gets the command for running the server in 'rsh' mode.
        Returns:
        the rsh