Class ReferenceableUtils


  • public final class ReferenceableUtils
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ReferenceableUtils.ExtractRec
      Deprecated.
      nesting references seemed useful until I realized that references are Serializable and can be stored in a BinaryRefAddr.
    • Field Detail

      • ALL_FACTORY_CLASS_NAMES

        public static final java.util.Set ALL_FACTORY_CLASS_NAMES
    • Method Detail

      • literalNullToNull

        public static java.lang.String literalNullToNull​(java.lang.String s)
        A null string value in a Reference sometimes goes to the literal "null". Sigh. We convert this string to a Java null.
      • referenceToObject

        public static java.lang.Object referenceToObject​(javax.naming.Reference ref,
                                                         javax.naming.Name name,
                                                         javax.naming.Context nameCtx,
                                                         java.util.Hashtable env)
                                                  throws javax.naming.NamingException
        Throws:
        javax.naming.NamingException
      • referenceToObject

        public static java.lang.Object referenceToObject​(javax.naming.Reference ref,
                                                         javax.naming.Name name,
                                                         javax.naming.Context nameCtx,
                                                         java.util.Hashtable env,
                                                         PropertiesConfig pcfg)
                                                  throws javax.naming.NamingException
        Throws:
        javax.naming.NamingException
      • referenceToObject

        public static java.lang.Object referenceToObject​(javax.naming.Reference ref,
                                                         javax.naming.Name name,
                                                         javax.naming.Context nameCtx,
                                                         java.util.Hashtable env,
                                                         java.util.Set allowedFactoryClassNames)
                                                  throws javax.naming.NamingException
        The allowedFactoryClassNames whitelist test can be (but generally should not be) circumvented by explicitly providing ReferenceUtils.ALL_FACTORY_CLASS_NAMES as the argument allowedFactoryClassNames. allowedFactoryClassNames must not be null. (A NullPointerException will be provoked if it is.)
        Throws:
        javax.naming.NamingException
      • referenceToObject

        public static java.lang.Object referenceToObject​(javax.naming.Reference ref,
                                                         javax.naming.Name name,
                                                         javax.naming.Context nameCtx,
                                                         java.util.Hashtable env,
                                                         java.util.Set allowedFactoryClassNames,
                                                         PropertiesConfig pcfg)
                                                  throws javax.naming.NamingException
        The allowedFactoryClassNames whitelist test can be (but generally should not be) circumvented by explicitly providing ReferenceUtils.ALL_FACTORY_CLASS_NAMES as the argument allowedFactoryClassNames. allowedFactoryClassNames must not be null. (A NullPointerException will be provoked if it is.)
        Throws:
        javax.naming.NamingException
      • assertAcceptableName

        public static void assertAcceptableName​(java.lang.Object jndiName,
                                                PropertiesConfig pcfg)
                                         throws javax.naming.NamingException
        Throws:
        javax.naming.NamingException
      • allowIndirectSerializationViaReference

        public static boolean allowIndirectSerializationViaReference​(PropertiesConfig pcfg)
      • generateSerializedObjectBinaryRefAddr

        public static boolean generateSerializedObjectBinaryRefAddr​(PropertiesConfig pcfg)
      • supportReferenceRemoteFactoryClassLocation

        public static boolean supportReferenceRemoteFactoryClassLocation​(PropertiesConfig pcfg)
      • acceptDeserializedInitialContextEnvironment

        public static boolean acceptDeserializedInitialContextEnvironment​(PropertiesConfig pcfg)
      • appendToReference

        public static void appendToReference​(javax.naming.Reference appendTo,
                                             javax.naming.Reference orig)
                                      throws javax.naming.NamingException
        Deprecated.
        nesting references seemed useful until I realized that references are Serializable and can be stored in a BinaryRefAddr. Oops.
        Throws:
        javax.naming.NamingException
      • extractNestedReference

        public static ReferenceableUtils.ExtractRec extractNestedReference​(javax.naming.Reference extractFrom,
                                                                           int index)
                                                                    throws javax.naming.NamingException
        Deprecated.
        nesting references seemed useful until I realized that references are Serializable and can be stored in a BinaryRefAddr. Oops.
        Throws:
        javax.naming.NamingException