当前位置: 首页>>代码示例>>Java>>正文


Java ORBUtility.getClassSecurityInfo方法代码示例

本文整理汇总了Java中com.sun.corba.se.impl.orbutil.ORBUtility.getClassSecurityInfo方法的典型用法代码示例。如果您正苦于以下问题:Java ORBUtility.getClassSecurityInfo方法的具体用法?Java ORBUtility.getClassSecurityInfo怎么用?Java ORBUtility.getClassSecurityInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.corba.se.impl.orbutil.ORBUtility的用法示例。


在下文中一共展示了ORBUtility.getClassSecurityInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doWork

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入方法依赖的package包/类
public void doWork()
{
    try {
        if (orb.transportDebugFlag) {
            dprint(".doWork->: " + this);
        }
        if (selectionKey.isAcceptable()) {
                    accept();
        } else {
            if (orb.transportDebugFlag) {
                dprint(".doWork: ! selectionKey.isAcceptable: " + this);
            }
        }
    } catch (SecurityException se) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring SecurityException: "
                   + se
                   + " " + this);
        }
        String permissionStr = ORBUtility.getClassSecurityInfo(getClass());
        wrapper.securityExceptionInAccept(se, permissionStr);
    } catch (Exception ex) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring Exception: "
                   + ex
                   + " " + this);
        }
        wrapper.exceptionInAccept(ex);
    } catch (Throwable t) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring Throwable: "
                   + t
                   + " " + this);
        }
    } finally {

        // IMPORTANT: To avoid bug (4953599), we force the
        // Thread that does the NIO select to also do the
        // enable/disable of Ops using SelectionKey.interestOps().
        // Otherwise, the SelectionKey.interestOps() may block
        // indefinitely.
        // NOTE: If "acceptorSocketUseWorkerThreadForEvent" is
        // set to to false in ParserTable.java, then this method,
        // doWork(), will get executed by the same thread
        // (SelectorThread) that does the NIO select.
        // If "acceptorSocketUseWorkerThreadForEvent" is set
        // to true, a WorkerThread will execute this method,
        // doWork(). Hence, the registering of the enabling of
        // the SelectionKey's interestOps is done here instead
        // of calling SelectionKey.interestOps(<interest op>).

        Selector selector = orb.getTransportManager().getSelector(0);
        selector.registerInterestOps(this);

        if (orb.transportDebugFlag) {
            dprint(".doWork<-:" + this);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:60,代码来源:SocketOrChannelAcceptorImpl.java

示例2: doWork

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入方法依赖的package包/类
public void doWork()
{
    try {
        if (orb.transportDebugFlag) {
            dprint(".doWork->: " + this);
        }
        if (selectionKey.isAcceptable()) {
                    accept();
        } else {
            if (orb.transportDebugFlag) {
                dprint(".doWork: ! selectionKey.isAcceptable: " + this);
            }
        }
    } catch (SecurityException se) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring SecurityException: "
                   + se
                   + " " + this);
        }
        String permissionStr = ORBUtility.getClassSecurityInfo(getClass());
        wrapper.securityExceptionInAccept(se, permissionStr);
    } catch (Exception ex) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring Exception: "
                   + ex
                   + " " + this);
        }
        wrapper.exceptionInAccept(ex);
    } catch (Throwable t) {
        if (orb.transportDebugFlag) {
            dprint(".doWork: ignoring Throwable: "
                   + t
                   + " " + this);
        }
    } finally {

        // IMPORTANT: To avoid bug (4953599), we force the
        // Thread that does the NIO select to also do the
        // enable/disable of Ops using SelectionKey.interestOps().
        // Otherwise, the SelectionKey.interestOps() may block
        // indefinitely.
        // NOTE: If "acceptorSocketUseWorkerThreadForEvent" is
        // set to to false in ParserTable.java, then this method,
        // doWork(), will get executed by the same thread
        // (SelectorThread) that does the NIO select.
        // If "acceptorSocketUseWorkerThreadForEvent" is set
        // to true, a WorkerThread will execute this method,
        // doWork(). Hence, the registering of the enabling of
        // the SelectionKey's interestOps is done here instead
        // of calling SelectionKey.interestOps(<interest op>).

        Selector selector = orb.getTransportManager().getSelector(0);
        if (selector != null) {
            selector.registerInterestOps(this);
        }

        if (orb.transportDebugFlag) {
            dprint(".doWork<-:" + this);
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:62,代码来源:SocketOrChannelAcceptorImpl.java


注:本文中的com.sun.corba.se.impl.orbutil.ORBUtility.getClassSecurityInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。