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

The following examples show how to use com.sun.corba.se.impl.orbutil.ORBUtility#getClassSecurityInfo() . 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: SocketOrChannelAcceptorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 2
Source File: SocketOrChannelAcceptorImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 3
Source File: SocketOrChannelAcceptorImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
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 4
Source File: SocketOrChannelAcceptorImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
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);
        }
    }
}
 
Example 5
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 6
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 7
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 8
Source File: SocketOrChannelAcceptorImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}
 
Example 9
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
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 10
Source File: SocketOrChannelAcceptorImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
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);
        }
    }
}