Example
The Java server:
Interface : Attributes\Greetings.java
Implementation: Attributes\GreetingsImpl.java
public interface Greetings extends Remote {
void setFirstName( String name)
throws RemoteException;
String getFirstName()
throws RemoteException;
void setBar( boolean oBar)
throws RemoteException;
boolean isBar()
throws RemoteException;
boolean getBar()
throws RemoteException;
}
The .Net client:
Implementation: ClientImpl.cs
IDL-File : Arrays.idl
Generated : Attributes.cs
Get access to the server object through .Net attributes:
oGreetings.firstName = "Middsol";
a_oFrmClt.writeLog("Get property FirstName: "+ oGreetings.firstName);
oGreetings.bar = false;
a_oFrmClt.writeLog("Get property Bar : "+ oGreetings.bar);
a_oFrmClt.writeLog("Call function getBar(): "+ oGreetings.getBar());
Remarks:
- setFirstName is mapped to the .Net firstname (set) attribute
- getFirstName is mapped to the .Net firstname (get) attribute
- setBar is mapped to the .Net bar (set) attribute
- isBar is mapped to the .Net bar (get) attribute
- getBar is mapped to the .Net function getBar()