WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.rmi.hello
Class HelloImpl

java.lang.Object
  |
  +--examples.rmi.hello.HelloImpl
All Implemented Interfaces:
Hello, weblogic.rmi.Remote, java.rmi.Remote

public class HelloImpl
extends java.lang.Object
implements Hello

This simple example is available as part of Sun's distribution package. We've just changed the package statement and import statements to work with WebLogic RMI.

Note that with WebLogic RMI, you don't need to extend UnicastRemoteObject. Also, you don't need to set a SecurityManager, although you can set one if desired. WebLogic RMI uses security measures (like SSL) that are build into WebLogic, rather than implementing a special case of security for remote objects.

Author:
Copyright (c) 1997-98 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Summary
HelloImpl(java.lang.String s)
          Constructs a HelloImpl with the specified string.
 
Method Summary
static void main(java.lang.String[] args)
          Allows the WebLogic Server to instantiate this implementation and bind it in the registry.
 java.lang.String sayHello()
          Returns a string.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelloImpl

public HelloImpl(java.lang.String s)
          throws weblogic.rmi.RemoteException
Constructs a HelloImpl with the specified string.
Parameters:
s - String message
Method Detail

main

public static void main(java.lang.String[] args)
Allows the WebLogic Server to instantiate this implementation and bind it in the registry.

sayHello

public java.lang.String sayHello()
                          throws weblogic.rmi.RemoteException
Returns a string.
Specified by:
sayHello in interface Hello
Returns:
String message
Throws:
weblogic.rmi.RemoteException -  

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.