Gets protocol.

@return protocol, may be null.
508576
public DistributerProtocolEnum getProtocol() {
    if (isReference()) {
      final DistributerDef refDistributer = (DistributerDef) getCheckedRef(DistributerDef.class, "DistributerDef");
      return refDistributer.getProtocol();
    }
    return this.protocol;
  }
888925
protected function getRequest()
    {
        // Check if current request handler has a request object
        $controller = $this->getController();
        if ($controller && !($controller->getRequest() instanceof NullHTTPRequest)) {
            return $controller->getRequest();
        }
        // Fall back to current controller
        if (Controller::has_curr() && !(Controller::curr()->getRequest() instanceof NullHTTPRequest)) {
            return Controller::curr()->getRequest();
        }
        return null;
    }
1246057
@Override
    public Void read(TProtocol protocol)
            throws Exception
    {
        Preconditions.checkNotNull(protocol, "protocol is null");
        return null;
    }
628491
public function getProtocolVersion():string {
		if(strstr($this->protocol, "/")) {
			return substr(
				$this->protocol,
				strpos($this->protocol, "/") + 1
			);
		}

		return $this->protocol;
	}
755620
public final ProtocolType getGuaranteedProtocolType() {
    Byte value = (Byte)jmo.getField(ControlAccess.PROTOCOLTYPE);
    return ProtocolType.getProtocolType(value);
  }
535478
public String getEndpoint() {
        String url = this.endpoint;
        // if the set endpoint does not contain a protocol, append protocol to head of it
        if (this.endpoint != null && this.endpoint.length() > 0
                && endpoint.indexOf("://") < 0) {
            url = protocol.toString().toLowerCase() + "://" + endpoint;
        }
        return url;
    }
571498
public static function protocolSchema()
    {
        $schema = '';
        if( preg_match( "#^([a-zA-Z]+)/.*$#", self::serverVariable( 'SERVER_PROTOCOL' ), $schemaMatches ) )
        {
            $schema = strtolower( $schemaMatches[1] ) . '://';
        }

        return $schema;
    }
447713
public static function getProtocol($type)
    {
        if (isset(self::$protocols[$type])) {
            return self::$protocols[$type];
        }

        switch ($type) {
            case Protocol::HTTP:
                self::$protocols[$type] = new Http();
                break;
            default:
                throw new InitiallyRpcException("undefined transport protocol");
        }

        return self::$protocols[$type];
    }
1183829
@Override
    public Packet getPacket(final Protocol p) throws IOException, PacketParseException {
        if (this.protocol == p) {
            return this;
        }

        final Packet child = getNextPacket();
        if (child != null && child.getProtocol() == p) {
            return child;
        }

        if (child == null) {
            return checkParent(p);
        }

        return child.getPacket(p);
    }
950723
final protected function getProtocol()
    {
        $protocol = $this->client->getProtocol();
        if (!$protocol instanceof Apollo) {
            throw new UnsupportedBrokerException($protocol, Apollo::class);
        }
        return $protocol;
    }
927242
protected PrimitiveProtocol protocol() {
    PrimitiveProtocol protocol = this.protocol;
    if (protocol == null) {
      PrimitiveProtocolConfig<?> protocolConfig = config.getProtocolConfig();
      if (protocolConfig == null) {
        Collection<PartitionGroup> partitionGroups = managementService.getPartitionService().getPartitionGroups();
        if (partitionGroups.size() == 1) {
          protocol = partitionGroups.iterator().next().newProtocol();
        } else {
          String groups = Joiner.on(", ").join(partitionGroups.stream()
              .map(group -> group.name())
              .collect(Collectors.toList()));
          throw new ConfigurationException(String.format("Primitive protocol is ambiguous: %d partition groups found (%s)", partitionGroups.size(), groups));
        }
      } else {
        protocol = protocolConfig.getType().newProtocol(protocolConfig);
      }
    }
    return protocol;
  }
1251755
public function getPort()
    {
        return $this->port && !Validator::isStandardPort($this->port) ? $this->port : null;
    }
263077
public static function getTransportMethod()
    {
        $method = 'curl';
        if (!self::isCurlEnabled()) {
            $method = 'fopen';
            if (@ini_get('allow_url_fopen') != '1') {
                $method = 'socket';
                if (!self::isSocketEnabled()) {
                    return null;
                }
            }
        }
        return $method;
    }
350576
public static function getProtocolName()
    {
        $matches = [];
        $protocolData = Miscellaneous::getSafelyGlobalVariable(INPUT_SERVER, 'SERVER_PROTOCOL'); // e.g. HTTP/1.1
        $matchCount = preg_match('|(.+)\/(.+)|', $protocolData, $matches);

        /*
         * $matches[1] - protocol name, e.g. HTTP
         * $matches[2] - protocol version, e.g. 1.1
         */

        // Oops, cannot match protocol
        if (0 === $matchCount) {
            return '';
        }

        return strtolower($matches[1]);
    }
733417
public function getHaving()
    {
        if (!isset($this->setHaving) or empty($this->setHaving)) {
            $this->setHaving = null;
        }

        return $this->setHaving;
    }
898641
protected function _protocol() {
		$https = $this->_runtimeConfig['https'];
		if ($https === null) {
			$https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on';
		}
		return $https ? 'https://' : '//';
	}
1345423
public String getSSLProtocol() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "getSSLProtocol");
        }

        // First check the properties object for the ciphers.
        String protocol = (String) this.myConfig.get(Constants.SSLPROP_PROTOCOL);

        // we only want to set the protocol on the engine if it a specific protocol name
        // don't set to TLS or SSL
        if (protocol.equals(Constants.PROTOCOL_SSL) || protocol.equals(Constants.PROTOCOL_TLS))
            protocol = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getSSLProtocol " + protocol);
        }
        return protocol;
    }