Package java.rmi

Examples of java.rmi.RMISecurityManager


     *             installed and prohibits installing a new security manager.
     */
    protected void installSecurityManager() throws NoPermissionException {
        if (!(System.getSecurityManager() instanceof RMISecurityManager)) {
            try {
                System.setSecurityManager(new RMISecurityManager());
            } catch (SecurityException e) {
                // jndi.84=Cannot install RMISecurityManager
                throw (NoPermissionException) new NoPermissionException(
                        Messages.getString("jndi.84")).initCause(e); //$NON-NLS-1$
            }
View Full Code Here


  /** Exports a searcher for the index in args[0] named
   * "//localhost/Searchable". */
  public static void main(String args[]) throws Exception {
    // create and install a security manager
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }
   
    Searchable local = new IndexSearcher(args[0]);
    RemoteSearchable impl = new RemoteSearchable(local);
     
View Full Code Here

      return;
    }
   
    // create and install a security manager
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }
   
    Searchable local = new IndexSearcher(FSDirectory.open(new File(indexName)), true);
    RemoteSearchable impl = new RemoteSearchable(local);
     
View Full Code Here

  Thread[] threadArray = new Thread[threadCount];
  int totalFailures = 0;
  for (int i=testNames.length; --i>=0; ) {
      tests.add(testNames[i]);
  }
  System.setSecurityManager(new RMISecurityManager());
  server = new SecureServer(this);
  MarshalledObject pickeledStub = server.getProxy();
  for (int i=threadCount; --i >= 0; ) {
      TestClient client = new SecureClient(this,
             pickeledStub);
View Full Code Here

        // output the name of this test
        logger.log(Level.FINE, "Test Name = " + this.getClass().getName());

        // set security manager
        System.setSecurityManager(new RMISecurityManager());
    }
View Full Code Here

  private ResourceBundle bundle =
      Util.getResourceBundle(CheckPersistence.class);

  public Object run(String[] args) {
      System.setSecurityManager(new RMISecurityManager());
      String dir = args[0];
      File dirFile = new File(dir);
      if (!dirFile.exists()) {
    return null; // the OK value
      }
View Full Code Here

  }
   
  public ServiceFinder(Vector result, String serviceType) throws IOException {
    _result = result;
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }

    // build our template
    Entry[] attrs = new Entry[]
      { new BasicServiceType(serviceType) };
View Full Code Here

    public static ArrayList _lookupInfoList = new ArrayList();
 
    private void setup() {
   
  if (_lookupSrvc == null// first time
      System.setSecurityManager(new RMISecurityManager());
  /* Use LookupLocatorDiscovery to find a Lookup Service */
  if (_lookupSrvc == null) { // first time
      // Use LookupDiscovery to find a Lookup Service
      try {
    System.out.println("LookupDiscovery for " + _groupsToJoin[0]);
View Full Code Here

    }
   
    public ServiceFinder(Vector result, String serviceType) throws IOException {
  _result = result;
  if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
  }

  // build our template
  Entry[] attrs = new Entry[]
  { new BasicServiceType(serviceType) };
View Full Code Here

  }
    }
 
    private void setup() {
  if (_lookupSrvc == null// first time
      System.setSecurityManager(new RMISecurityManager());
  /* ----------------------------------------------------------------- */

  /* ----------------------------------------------------------------- */
  /* ----------------------------------------------------------------- */
  /* ----------------------------------------------------------------- */
 
View Full Code Here

TOP

Related Classes of java.rmi.RMISecurityManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.