public String toString() { return getAbsoluteName(); }
/** * Create a new JNDI name by appending a new local entry name to this name. * * @param local The new local part to append * @return A new JNDI name */ public JndiName append(final String local) { return new JndiName(this, local); }
public static JndiName parse(String value) { return value.startsWith("java:") ? JndiName.of(value) : createJndiName(DEFAULT_JNDI_NAMESPACE, value.startsWith("/") ? value.substring(1) : value); }
@Override public int hashCode() { int result = parent != null ? parent.hashCode() : 0; result = 31 * result + (local != null ? local.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final JndiName jndiName = (JndiName) o; return !(local != null ? !local.equals(jndiName.local) : jndiName.local != null) && !(parent != null ? !parent.equals(jndiName.parent) : jndiName.parent != null); }
public static JndiName parse(String value) { return value.startsWith("java:") ? JndiName.of(value) : createJndiName(DEFAULT_JNDI_NAMESPACE, value.startsWith("/") ? value.substring(1) : value); }
@Override public int hashCode() { int result = parent != null ? parent.hashCode() : 0; result = 31 * result + (local != null ? local.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final JndiName jndiName = (JndiName) o; return !(local != null ? !local.equals(jndiName.local) : jndiName.local != null) && !(parent != null ? !parent.equals(jndiName.parent) : jndiName.parent != null); }
@Override public int compareTo(final JndiName other) { return getAbsoluteName().compareTo(other.getAbsoluteName()); } }
/** * Create a new instance of the JndiName by breaking the provided string format into a JndiName parts. * * @param name The string representation of a JNDI name. * @return The JndiName representation */ public static JndiName of(final String name) { if(name == null || name.isEmpty()) throw NamingLogger.ROOT_LOGGER.invalidJndiName(name); final String[] parts = name.split(ENTRY_SEPARATOR); JndiName current = null; for(String part : parts) { current = new JndiName(current, part); } return current; }
public static JndiName parse(String value) { return value.startsWith("java:") ? JndiName.of(value) : createJndiName(DEFAULT_JNDI_NAMESPACE, value.startsWith("/") ? value.substring(1) : value); }
@Override public int hashCode() { int result = parent != null ? parent.hashCode() : 0; result = 31 * result + (local != null ? local.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final JndiName jndiName = (JndiName) o; return !(local != null ? !local.equals(jndiName.local) : jndiName.local != null) && !(parent != null ? !parent.equals(jndiName.parent) : jndiName.parent != null); }
public static ContextNames.BindInfo createChannelBinding(String channel) { return ContextNames.bindInfoFor(JndiNameFactory.createJndiName(JndiNameFactory.DEFAULT_JNDI_NAMESPACE, JGroupsExtension.SUBSYSTEM_NAME, "channel", channel).getAbsoluteName()); }
/** * Create a new JNDI name by appending a new local entry name to this name. * * @param local The new local part to append * @return A new JNDI name */ public JndiName append(final String local) { return new JndiName(this, local); }
@Override public int hashCode() { int result = parent != null ? parent.hashCode() : 0; result = 31 * result + (local != null ? local.hashCode() : 0); return result; }