當前位置: 首頁>>代碼示例>>Java>>正文


Java NamingManager.getContinuationContext方法代碼示例

本文整理匯總了Java中javax.naming.spi.NamingManager.getContinuationContext方法的典型用法代碼示例。如果您正苦於以下問題:Java NamingManager.getContinuationContext方法的具體用法?Java NamingManager.getContinuationContext怎麽用?Java NamingManager.getContinuationContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.naming.spi.NamingManager的用法示例。


在下文中一共展示了NamingManager.getContinuationContext方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getContinuationContext

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
static private javax.naming.Context
    getContinuationContext(CannotProceedException cpe)
    throws NamingException {
    try {
        return NamingManager.getContinuationContext(cpe);
    } catch (CannotProceedException e) {
        java.lang.Object resObj = e.getResolvedObj();
        if (resObj instanceof Reference) {
            Reference ref = (Reference)resObj;
            RefAddr addr = ref.get("nns");
            if (addr.getContent() instanceof javax.naming.Context) {
                NamingException ne = new NameNotFoundException(
                    "No object reference bound for specified name");
                ne.setRootCause(cpe.getRootCause());
                ne.setRemainingName(cpe.getRemainingName());
                throw ne;
            }
        }
        throw e;
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:22,代碼來源:CNCtx.java

示例2: createSubcontext

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public Context createSubcontext(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    Context answer;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        answer = ctx.p_createSubcontext(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_createSubcontext(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.createSubcontext(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:21,代碼來源:PartialCompositeContext.java

示例3: list

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public NamingEnumeration<NameClassPair> list(Name name)
    throws NamingException
{
    PartialCompositeContext ctx = this;
    Name nm = name;
    NamingEnumeration<NameClassPair> answer;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        answer = ctx.p_list(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_list(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.list(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:23,代碼來源:PartialCompositeContext.java

示例4: getNameParser

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public NameParser getNameParser(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    NameParser answer;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        answer = ctx.p_getNameParser(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_getNameParser(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.getNameParser(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:21,代碼來源:PartialCompositeContext.java

示例5: bind

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public void bind(Name name, Object newObj) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        ctx.p_bind(nm, newObj, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            ctx.p_bind(nm, newObj, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        cctx.bind(e.getRemainingName(), newObj);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:19,代碼來源:PartialCompositeContext.java

示例6: destroySubcontext

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public void destroySubcontext(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        ctx.p_destroySubcontext(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            ctx.p_destroySubcontext(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        cctx.destroySubcontext(e.getRemainingName());
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:19,代碼來源:PartialCompositeContext.java

示例7: unbind

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public void unbind(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        ctx.p_unbind(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            ctx.p_unbind(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        cctx.unbind(e.getRemainingName());
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:19,代碼來源:PartialCompositeContext.java

示例8: listBindings

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public NamingEnumeration<Binding> listBindings(Name name)
    throws NamingException
{
    PartialCompositeContext ctx = this;
    Name nm = name;
    NamingEnumeration<Binding> answer;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        answer = ctx.p_listBindings(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_listBindings(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.listBindings(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:23,代碼來源:PartialCompositeContext.java

示例9: lookupLink

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public Object lookupLink(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Object answer;
    Name nm = name;

    try {
        answer = ctx.p_lookupLink(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_lookupLink(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.lookupLink(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:21,代碼來源:PartialCompositeContext.java

示例10: lookup

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public Object lookup(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Object answer;
    Name nm = name;

    try {
        answer = ctx.p_lookup(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_lookup(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.lookup(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:21,代碼來源:PartialCompositeContext.java

示例11: rename

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public void rename(Name oldName, Name newName)
    throws NamingException
{
    PartialCompositeContext ctx = this;
    Name nm = oldName;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(oldName, env);

    try {
        ctx.p_rename(nm, newName, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            ctx.p_rename(nm, newName, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        if (e.getRemainingNewName() != null) {
            // %%% e.getRemainingNewName() should never be null
            newName = e.getRemainingNewName();
        }
        cctx.rename(e.getRemainingName(), newName);
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:25,代碼來源:PartialCompositeContext.java

示例12: rebind

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public void rebind(Name name, Object newObj) throws NamingException {
    PartialCompositeContext ctx = this;
    Name nm = name;
    Hashtable<?,?> env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        ctx.p_rebind(nm, newObj, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            ctx.p_rebind(nm, newObj, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        cctx.rebind(e.getRemainingName(), newObj);
    }
}
 
開發者ID:ojdkbuild,項目名稱:lookaside_java-1.8.0-openjdk,代碼行數:19,代碼來源:PartialCompositeContext.java

示例13: lookupLink

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public Object lookupLink(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Hashtable env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Object answer;
    Name nm = name;

    try {
        answer = ctx.p_lookupLink(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_lookupLink(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.lookupLink(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:aducode,項目名稱:openjdk-source-code-learn,代碼行數:21,代碼來源:PartialCompositeContext.java

示例14: lookup

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public Object lookup(Name name) throws NamingException {
    PartialCompositeContext ctx = this;
    Hashtable env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);
    Object answer;
    Name nm = name;

    try {
        answer = ctx.p_lookup(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_lookup(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.lookup(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:openjdk,項目名稱:jdk7-jdk,代碼行數:21,代碼來源:PartialCompositeContext.java

示例15: list

import javax.naming.spi.NamingManager; //導入方法依賴的package包/類
public NamingEnumeration<NameClassPair> list(Name name)
    throws NamingException
{
    PartialCompositeContext ctx = this;
    Name nm = name;
    NamingEnumeration answer;
    Hashtable env = p_getEnvironment();
    Continuation cont = new Continuation(name, env);

    try {
        answer = ctx.p_list(nm, cont);
        while (cont.isContinue()) {
            nm = cont.getRemainingName();
            ctx = getPCContext(cont);
            answer = ctx.p_list(nm, cont);
        }
    } catch (CannotProceedException e) {
        Context cctx = NamingManager.getContinuationContext(e);
        answer = cctx.list(e.getRemainingName());
    }
    return answer;
}
 
開發者ID:greghaskins,項目名稱:openjdk-jdk7u-jdk,代碼行數:23,代碼來源:PartialCompositeContext.java


注:本文中的javax.naming.spi.NamingManager.getContinuationContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。