Class AbstractHttpCommandCodec

    • Constructor Detail

      • AbstractHttpCommandCodec

        public AbstractHttpCommandCodec()
    • Method Detail

      • encode

        public org.openqa.selenium.remote.http.HttpRequest encode​(Command command)
        Description copied from interface: CommandCodec
        Encodes a command.
        Specified by:
        encode in interface CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
        Parameters:
        command - the command to encode.
        Returns:
        the encoded command.
      • amendParameters

        protected abstract java.util.Map<java.lang.String,​?> amendParameters​(java.lang.String name,
                                                                                   java.util.Map<java.lang.String,​?> parameters)
      • decode

        public Command decode​(org.openqa.selenium.remote.http.HttpRequest encodedCommand)
        Description copied from interface: CommandCodec
        Decodes a command.
        Specified by:
        decode in interface CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
        Parameters:
        encodedCommand - the command to decode.
        Returns:
        the decoded command.
      • defineCommand

        public void defineCommand​(java.lang.String name,
                                  org.openqa.selenium.remote.http.HttpMethod method,
                                  java.lang.String pathPattern)
        Defines a new command mapping.
        Specified by:
        defineCommand in interface CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
        Parameters:
        name - The command name.
        method - The HTTP method to use for the command.
        pathPattern - The URI path pattern for the command. When encoding a command, each path segment prefixed with a ":" will be replaced with the corresponding parameter from the encoded command.
      • alias

        public void alias​(java.lang.String commandName,
                          java.lang.String isAnAliasFor)
        Description copied from interface: CommandCodec
        Allow commands to have aliases.
        Specified by:
        alias in interface CommandCodec<org.openqa.selenium.remote.http.HttpRequest>
        Parameters:
        commandName - The command being added.
        isAnAliasFor - The command name that this is an alias for.