javax.naming.NameParser Java Examples
The following examples show how to use
javax.naming.NameParser.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NamingContext.java From Tomcat8-Source-Read with MIT License | 6 votes |
/** * Retrieves the parser associated with the named context. In a * federation of namespaces, different naming systems will parse names * differently. This method allows an application to get a parser for * parsing names into their atomic components using the naming convention * of a particular naming system. Within any single naming system, * NameParser objects returned by this method must be equal (using the * equals() test). * * @param name the name of the context from which to get the parser * @return a name parser that can parse compound names into their atomic * components * @exception NamingException if a naming exception is encountered */ @Override public NameParser getNameParser(Name name) throws NamingException { while ((!name.isEmpty()) && (name.get(0).length() == 0)) name = name.getSuffix(1); if (name.isEmpty()) return nameParser; if (name.size() > 1) { Object obj = bindings.get(name.get(0)); if (obj instanceof Context) { return ((Context) obj).getNameParser(name.getSuffix(1)); } else { throw new NotContextException (sm.getString("namingContext.contextExpected")); } } return nameParser; }
Example #2
Source File: NamingContext.java From tomcatsrc with Apache License 2.0 | 6 votes |
/** * Retrieves the parser associated with the named context. In a * federation of namespaces, different naming systems will parse names * differently. This method allows an application to get a parser for * parsing names into their atomic components using the naming convention * of a particular naming system. Within any single naming system, * NameParser objects returned by this method must be equal (using the * equals() test). * * @param name the name of the context from which to get the parser * @return a name parser that can parse compound names into their atomic * components * @exception NamingException if a naming exception is encountered */ @Override public NameParser getNameParser(Name name) throws NamingException { while ((!name.isEmpty()) && (name.get(0).length() == 0)) name = name.getSuffix(1); if (name.isEmpty()) return nameParser; if (name.size() > 1) { Object obj = bindings.get(name.get(0)); if (obj instanceof Context) { return ((Context) obj).getNameParser(name.getSuffix(1)); } else { throw new NotContextException (sm.getString("namingContext.contextExpected")); } } return nameParser; }
Example #3
Source File: RetryingContext.java From james-project with Apache License 2.0 | 5 votes |
@Override public NameParser getNameParser(final String name) throws NamingException { return (NameParser) new LoggingRetryHandler(DEFAULT_EXCEPTION_CLASSES, this, schedule, maxRetries ) { @Override public Object operation() throws NamingException { return getDelegate().getNameParser(name); } }.perform(); }
Example #4
Source File: LocalContext.java From unitime with Apache License 2.0 | 5 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { Object obj = lookup(name); if (obj instanceof Context) ((Context) obj).close(); return this; }
Example #5
Source File: InVMNamingContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); }
Example #6
Source File: SimpleNamingContext.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); }
Example #7
Source File: StubContext.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return new NameParserStub(); }
Example #8
Source File: FakeContext.java From kieker with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public NameParser getNameParser(final String name) throws NamingException { return null; }
Example #9
Source File: InVMContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); }
Example #10
Source File: TestContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return NAME_PARSER; }
Example #11
Source File: InVMNamingContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(final String name) throws NamingException { return parser; }
Example #12
Source File: EmptyDirContext.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return nameParser; }
Example #13
Source File: LocalContext.java From unitime with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return getNameParser(new CompositeName(name)); }
Example #14
Source File: FakeContext.java From kieker with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public NameParser getNameParser(final String name) throws NamingException { return null; }
Example #15
Source File: FakeContext.java From kieker with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public NameParser getNameParser(final Name name) throws NamingException { return null; }
Example #16
Source File: StubContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return new NameParserStub(); }
Example #17
Source File: EmptyDirContext.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return nameParser; }
Example #18
Source File: SimpleNamingContext.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); }
Example #19
Source File: InVMNamingContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(final String name) throws NamingException { return parser; }
Example #20
Source File: SimpleNamingContext.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { throw new OperationNotSupportedException("SimpleNamingContext does not support [javax.naming.Name]"); }
Example #21
Source File: StubContext.java From hottub with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return new NameParserStub(); }
Example #22
Source File: StubContext.java From hottub with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return new NameParserStub(); }
Example #23
Source File: ReadOnlyContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return NAME_PARSER; }
Example #24
Source File: StubContext.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return new NameParserStub(); }
Example #25
Source File: MockContext.java From Knowage-Server with GNU Affero General Public License v3.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return null; }
Example #26
Source File: MockContext.java From Knowage-Server with GNU Affero General Public License v3.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return null; }
Example #27
Source File: StubContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return new NameParserStub(); }
Example #28
Source File: StubContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(String name) throws NamingException { return new NameParserStub(); }
Example #29
Source File: StubContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return new NameParserStub(); }
Example #30
Source File: ReadOnlyContext.java From activemq-artemis with Apache License 2.0 | 4 votes |
@Override public NameParser getNameParser(Name name) throws NamingException { return NAME_PARSER; }