Re: Simple examples of using a SSCell collaborative

  • To: Radovan Stas <radoone@xxxxxx>
  • Subject: Re: Simple examples of using a SSCell collaborative
  • From: Curtis Rueden <ctrueden@xxxxxxxx>
  • Date: Tue, 03 Aug 2004 11:38:52 -0500
Hi Radovan,

On the server side, you construct a RemoteServerImpl object,
then add your BasicSSCell (or FancySSCell) objects to that server:

// initialize remote server - see SpreadSheet.java lines 1097-1141
RemoteServerImpl rsi = new RemoteServerImpl();
Naming.rebind("///" + server, rsi);

// add spreadsheet cells to remote server
BasicSSCell cell = ...;
cell.addToRemoteServer(rsi);

The only tricky part is that you either have to be running the
rmiregistry server already, or start it yourself in the Java code
using the call:

LocateRegistry.createRegistry(Registry.REGISTRY_PORT);

On the client side, you locate the remote server, then construct
your BasicSSCells (or FancySSCells) using that server as an
argument, so that they will be cloned cells:

// get remote server - see SpreadSheet.java line 684
RemoteServer rs = (RemoteServer) Naming.lookup("//" + clone);

// construct cloned cells (linked to cells on remote server)
BasicSSCell cell1 = new BasicSSCell("cell1", rs);
...

I suggest checking out the Javadocs for FancySSCell, BasicSSCell
and perhaps SpreadSheet if you have not already. The VisAD
Javadocs can be found online at:
    http://www.ssec.wisc.edu/~dglo/docs/index.html

Good luck,
-Curtis

At 07:54 PM 8/2/2004, Radovan Stas wrote:
>Hi all,
>I am realy new to visad and i hope somebody can help me.
> I am using a FancySSCell in my aplication. I would make aplication 
>collaborative. I read  a Collaborative VisAD applications. tutorial but I see 
>a *SScell have function to get collaborative.
>
>I need  simple examples of using  a   visad.ss.*SSCell  metods  to make   
>remote server and remote client.
>Thanks.
>
>Radovan Stas (RadOOne)


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: