com.iona.corbautil
Class ImportExportExampleAlgorithm
java.lang.Object
|
+--com.iona.corbautil.ImportExportExampleAlgorithm
- All Implemented Interfaces:
- ImportExportAlgorithm
- public class ImportExportExampleAlgorithm
- extends java.lang.Object
- implements ImportExportAlgorithm
Example of how to implement the ImportExportAlgorithm interface.
To use this implementation, specify
"java_class#com.iona.corbautil.ImportExportExampleAlgorithm"
as the instructions: this class will be dynamically loaded and used.
This class imports object reference by reading them from standard
input. It exports object reference by writing them to standard output.
|
Method Summary |
void |
exportObjRef(org.omg.CORBA.ORB orb,
org.omg.CORBA.Object obj,
java.lang.String instructions)
Writes the IOR and the instructions to the console. |
org.omg.CORBA.Object |
importObjRef(org.omg.CORBA.ORB orb,
java.lang.String instructions)
Writes the instructions to the console; then waits for a
stringified object references to be typed in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportExportExampleAlgorithm
public ImportExportExampleAlgorithm()
exportObjRef
public void exportObjRef(org.omg.CORBA.ORB orb,
org.omg.CORBA.Object obj,
java.lang.String instructions)
throws ImportExportException
- Writes the IOR and the instructions to the console.
- Specified by:
exportObjRef in interface ImportExportAlgorithm
- Parameters:
orb - The orb.obj - The objectinstructions - The instructions
ImportExportException
importObjRef
public org.omg.CORBA.Object importObjRef(org.omg.CORBA.ORB orb,
java.lang.String instructions)
throws ImportExportException
- Writes the instructions to the console; then waits for a
stringified object references to be typed in. This is
unstringified and returned.
- Specified by:
importObjRef in interface ImportExportAlgorithm
- Parameters:
orb - The orb.instructions - The instructions
- Returns:
- The object.
ImportExportException