Class OpaUrl


  • public class OpaUrl
    extends java.lang.Object
    Contains request URL which is then used to call OPA server Provides methods useful in URL validation/manipulation
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getValue()  
      OpaUrl normalized()  
      static OpaUrl of​(java.lang.String serverUrl, java.lang.String endpoint)
      Creates OpaUrl
      java.net.URI toUri()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static OpaUrl of​(java.lang.String serverUrl,
                                java.lang.String endpoint)
        Creates OpaUrl
        Parameters:
        serverUrl - URL of OPA Server
        endpoint - endpoint path
        Returns:
        created OpaUrl
      • getValue

        public java.lang.String getValue()
        Returns:
        String value of OPA URL
      • normalized

        public OpaUrl normalized()
        Returns:
        Normalized version of URL, removing multiple and trailing slashes
      • toUri

        public java.net.URI toUri()
        Returns:
        OpaUrl transformed to URI