Java Code Examples for com.sun.corba.se.impl.orbutil.ORBUtility.getClassSecurityInfo()

The following are Jave code examples for showing how to use getClassSecurityInfo() of the com.sun.corba.se.impl.orbutil.ORBUtility class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenJSharp   File: SocketOrChannelAcceptorImpl.java   Source Code and License Vote up 4 votes
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);
        }
    }
}
 
Example 2
Project: openjdk-jdk10   File: SocketOrChannelAcceptorImpl.java   Source Code and License Vote up 4 votes
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);
        }
    }
}