Package java.rmi

Examples of java.rmi.RMISecurityManager


     * @throws  Exception
     *          If some error occurs.
     */
    private void runRegistry(int config) throws Exception {
        System.err.println("Registry starting");
        System.setSecurityManager(new RMISecurityManager());
        setEnvironmentForConfig(config);
        Registry reg = LocateRegistry.createRegistry(REGISTRY_PORT);
        System.err.println("Registry initialized, telling READY to parent");
        SubProcess.tellOut();
        System.err.println("Expecting READY from parent");
View Full Code Here


     * @throws  Exception
     *          If some error occurs.
     */
    private void runTestServer0(int config) throws Exception {
        System.err.println("Test server started");
        System.setSecurityManager(new RMISecurityManager());
        setEnvironmentForConfig(config);
        MyRemoteInterface1 obj = new TestObject();
        UnicastRemoteObject.exportObject(obj, CUSTOM_PORT_4);
        LocateRegistry.getRegistry().rebind(
                TEST_STRING_1, RemoteObject.toStub(obj));
View Full Code Here

     * @throws  Exception
     *          If some error occurs.
     */
    private void runTestClient0(int config) throws Exception {
        System.err.println("Test client started");
        System.setSecurityManager(new RMISecurityManager());
        setEnvironmentForConfig(config);
        Registry reg = LocateRegistry.getRegistry();
        MyRemoteInterface1 mri = (MyRemoteInterface1) reg.lookup(TEST_STRING_1);
        mri.test1();
        System.err.println("Test client completed");
View Full Code Here

     * @throws  Exception
     *          If some error occurs.
     */
    private void runTestServer3(int config) throws Exception {
        System.err.println("Test server started");
        System.setSecurityManager(new RMISecurityManager());
        setEnvironmentForConfig(config);
        Registry reg = LocateRegistry.createRegistry(REGISTRY_PORT);
        TestObject obj = new TestObject();
        UnicastRemoteObject.exportObject(obj, REGISTRY_PORT);
        obj = null;
View Full Code Here

   *
   * @param args
   */
  public static void main(String[] args) {
    if (System.getSecurityManager() == null) {
      System.setSecurityManager(new RMISecurityManager());
    }
   
    int port = 1099;
    InetAddress localhost = null;
    try {
View Full Code Here

        try {
/*        Set the security manager to allow the RMI class loader
          to go to the codebase for classes that are not available
          locally.  */

        System.setSecurityManager (new RMISecurityManager ());

/*      Create the attributes (an array of entry objects) that describe this
        server and use it to register this server with the lookup service.
        JoinManager finds and registers with the lookup service */

 
View Full Code Here

          try {
  /*          Set the security manager to allow the RMI class loader to access
              the codebase for classes that are not available locally */

              System.setSecurityManager (new RMISecurityManager ());

  /*          Find the Jini lookup service (reggie) and print its location */

              lookup = new LookupLocator ("jini://localhost");

View Full Code Here

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

        String server_auth = "chat.AuthenticationServer";

        if (System.getSecurityManager() == null) {
            System.setProperty("java.rmi.server.codebase", codebase);
            System.setProperty("java.security.policy", policySetup);
            System.setSecurityManager(new RMISecurityManager());
        }

        Properties serverProp = new Properties();
        serverProp.put("javax.net.ssl.trustStore", "truststore");
        serverProp.put("javax.net.ssl.trustStorePassword", truststorePass);
View Full Code Here

        if (System.getSecurityManager() == null) {
            System.setProperty("java.security.policy", policy);
            System.setProperty("javax.net.ssl.trustStore", "truststore");
            System.setProperty("javax.net.ssl.trustStorePassword", truststorePass);

            System.setSecurityManager(new RMISecurityManager());
        }      

        if (!args[0].isEmpty()) {
            codebase = "http://" + args[0];
        }
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.