Horus Doc || Java GUI Reference || Doxygen's quick Index  

AppletCorbaMediator Class Reference

CorbaMediator used in an applet. More...

Inheritance diagram for AppletCorbaMediator::

CorbaMediator List of all members.

Public Methods

 AppletCorbaMediator (JApplet applet)
boolean hasInProcServer ()
boolean hasLocalServer ()
boolean isAlive (org.omg.CORBA.Object obj)
boolean isServerObject (org.omg.CORBA.Object obj)
org.omg.CORBA.ORB orb ()
String object_to_string (org.omg.CORBA.Object obj)
org.omg.CORBA.Object string_to_object (String ref)
String registerApp (HxCorba.AppOperations app, String prefix)
void unregisterApp (String name)
RgbTransferManager createRgbTxMgr (int size, org.omg.CORBA.Object source)
org.omg.CORBA.Object getInitialObject (String name)
org.omg.CORBA.Object getService (String name)

Detailed Description

CorbaMediator used in an applet.

The connection to the orb is made based on the information from the applet properties (typically services).


Constructor & Destructor Documentation

AppletCorbaMediator::AppletCorbaMediator JApplet    applet [inline]
 

00026 {
00027     try {
00028         _services = loadReferences(applet);
00029         _orb = org.omg.CORBA.ORB.init(applet, null);
00030     }
00031     catch(Exception e) {
00032         ErrorStreamArea.println(" "+e);
00033         e.printStackTrace();
00034     }
00035 }


Member Function Documentation

boolean AppletCorbaMediator::hasInProcServer   [inline, virtual]
 

Reimplemented from CorbaMediator.

00038 {
00039     return false;
00040 }

boolean AppletCorbaMediator::hasLocalServer   [inline, virtual]
 

Reimplemented from CorbaMediator.

00043 {
00044     return false;
00045 }

boolean AppletCorbaMediator::isAlive org.omg.CORBA.Object    obj [inline, virtual]
 

Reimplemented from CorbaMediator.

00048 {
00049     String something = "IDL:HxCorba/Checking/Object:99.9";
00050     if(obj == null) return false;
00051     try {
00052         obj._is_a(something);
00053         return true;
00054     }catch(Exception e) {
00055         return false;
00056     }
00057 }

boolean AppletCorbaMediator::isServerObject org.omg.CORBA.Object    obj [inline, virtual]
 

Reimplemented from CorbaMediator.

00060 {
00061     try {
00062         org.omg.CORBA.Object objCons = getInitialObject("Constructor");
00063         HxCorba.Constructor cons = HxCorba.ConstructorHelper.narrow(objCons);
00064 
00065         StubInfo info1 = StubRepository.getStubInfo(cons);
00066         StubInfo info2 = StubRepository.getStubInfo(obj);
00067 
00068         return (info1.getItem("Host").equals(info2.getItem("Host")) &&
00069             info1.getItem("Port").equals(info2.getItem("Port")));
00070     }
00071     catch(Exception e){
00072         return false;
00073     }
00074 }

org.omg.CORBA.ORB AppletCorbaMediator::orb   [inline, virtual]
 

Reimplemented from CorbaMediator.

00078 {
00079     return _orb;
00080 }

String AppletCorbaMediator::object_to_string org.omg.CORBA.Object    obj [inline, virtual]
 

Reimplemented from CorbaMediator.

00083 {
00084     return _orb.object_to_string(obj);
00085 }

org.omg.CORBA.Object AppletCorbaMediator::string_to_object String    ref [inline, virtual]
 

Reimplemented from CorbaMediator.

00088 {
00089     return _orb.string_to_object(ref);
00090 }

String AppletCorbaMediator::registerApp HxCorba.AppOperations    app,
String    prefix
[inline, virtual]
 

Reimplemented from CorbaMediator.

00093 {
00094     return null;
00095 }

void AppletCorbaMediator::unregisterApp String    name [inline, virtual]
 

Reimplemented from CorbaMediator.

00098 {
00099 }

RgbTransferManager AppletCorbaMediator::createRgbTxMgr int    size,
org.omg.CORBA.Object    source
[inline, virtual]
 

Reimplemented from CorbaMediator.

00102 {
00103     if(source == null) return new NoBufferTxManager();
00104 
00105     return new ServerBufferTxManager(size);
00106 }

org.omg.CORBA.Object AppletCorbaMediator::getInitialObject String    name [inline, virtual]
 

Reimplemented from CorbaMediator.

00109 {
00110     return getService(name);
00111 }

org.omg.CORBA.Object AppletCorbaMediator::getService String    name [inline, virtual]
 

Reimplemented from CorbaMediator.

00114 {
00115     String objRef = _services.getProperty(name);
00116     if(objRef != null)
00117         return _orb.string_to_object(objRef);
00118     else {
00119         //ErrorStreamArea.println("\""+name+"\" not found in configuration file");
00120         return null;
00121     }
00122 }


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 14:19:36 2004 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001