Java Code Examples for java.net.SocketPermission#implies()
The following examples show how to use
java.net.SocketPermission#implies() .
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: AppletViewer.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 2
Source File: AppletViewer.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ @Override public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 3
Source File: AppletViewer.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 4
Source File: AppletViewer.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 5
Source File: AppletViewer.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration<AppletPanel> e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 6
Source File: AppletViewer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ @Override public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 7
Source File: AppletViewer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 8
Source File: AppletViewer.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 9
Source File: AppletViewer.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 10
Source File: AppletViewer.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 11
Source File: AppletViewer.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 12
Source File: AppletViewer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ @Override public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 13
Source File: AppletViewer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 14
Source File: AppletViewer.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Get an applet by name. */ @Override public Applet getApplet(String name) { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); name = name.toLowerCase(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); String param = p.getParameter("name"); if (param != null) { param = param.toLowerCase(); } if (name.equals(param) && p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { return p.applet; } } } return null; }
Example 15
Source File: AppletViewer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Return an enumeration of all the accessible * applets on this page. */ @Override public Enumeration getApplets() { AppletSecurity security = (AppletSecurity)System.getSecurityManager(); Vector v = new Vector(); SocketPermission panelSp = new SocketPermission(panel.getCodeBase().getHost(), "connect"); for (Enumeration e = appletPanels.elements() ; e.hasMoreElements() ;) { AppletPanel p = (AppletPanel)e.nextElement(); if (p.getDocumentBase().equals(panel.getDocumentBase())) { SocketPermission sp = new SocketPermission(p.getCodeBase().getHost(), "connect"); if (panelSp.implies(sp)) { v.addElement(p.applet); } } } return v.elements(); }
Example 16
Source File: Wildcard.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { SocketPermission star_All = new SocketPermission("*.blabla.bla", "listen,accept,connect"); SocketPermission www_All = new SocketPermission("bla.blabla.bla", "listen,accept,connect"); if (!star_All.implies(www_All)) { throw new RuntimeException( "Failed: " + star_All + " does not imply " + www_All); } }
Example 17
Source File: Wildcard.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { SocketPermission star_All = new SocketPermission("*.blabla.bla", "listen,accept,connect"); SocketPermission www_All = new SocketPermission("bla.blabla.bla", "listen,accept,connect"); if (!star_All.implies(www_All)) { throw new RuntimeException( "Failed: " + star_All + " does not imply " + www_All); } }
Example 18
Source File: Wildcard.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { SocketPermission star_All = new SocketPermission("*.blabla.bla", "listen,accept,connect"); SocketPermission www_All = new SocketPermission("bla.blabla.bla", "listen,accept,connect"); if (!star_All.implies(www_All)) { throw new RuntimeException( "Failed: " + star_All + " does not imply " + www_All); } }
Example 19
Source File: Wildcard.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { SocketPermission star_All = new SocketPermission("*.blabla.bla", "listen,accept,connect"); SocketPermission www_All = new SocketPermission("bla.blabla.bla", "listen,accept,connect"); if (!star_All.implies(www_All)) { throw new RuntimeException( "Failed: " + star_All + " does not imply " + www_All); } }
Example 20
Source File: Wildcard.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { SocketPermission star_All = new SocketPermission("*.blabla.bla", "listen,accept,connect"); SocketPermission www_All = new SocketPermission("bla.blabla.bla", "listen,accept,connect"); if (!star_All.implies(www_All)) { throw new RuntimeException( "Failed: " + star_All + " does not imply " + www_All); } }