ServerImpl.java revision 0
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * This code is free software; you can redistribute it and/or modify it
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * under the terms of the GNU General Public License version 2 only, as
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * published by the Free Software Foundation.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * This code is distributed in the hope that it will be useful, but WITHOUT
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * version 2 for more details (a copy is included in the LICENSE file that
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * accompanied this code).
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * You should have received a copy of the GNU General Public License version
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * 2 along with this work; if not, write to the Free Software Foundation,
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes * CA 95054 USA or visit www.sun.com if you need additional information or
16b55a35cff91315d261d1baa776138af465c4e4fuankg * have any questions.
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes public ServerImpl(String s) throws java.rmi.RemoteException {
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes public String sayHello(Callback c) throws RemoteException {
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes System.out.println("Calling Callback method from the ServerImpl");
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes public void run() {
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes "+ running a new thread in sayHello method!");
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes "ServerImpl.main: exception while calling callback " +
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes return "Hello Callback!";
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes // Create and install the security manager
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes System.setSecurityManager(new RMISecurityManager());
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes System.out.println("ServerImpl created and bound in the registry" +
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes " to the name ServerImpl");
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg } catch (Exception e) {
3c937b528ca923d5b51e63def9f888af4a77bb40bnicholes System.out.println("ServerImpl.main: an exception occurred:");