portaview.server
Class PortaViewClient

java.lang.Object
  extended byportaview.server.PortaViewClient

public class PortaViewClient
extends java.lang.Object

Provides the API for client calls to remote PortaViews.

Version:
$Id: PortaViewClient.java,v 1.10 2003/12/10 06:18:57 wlee Exp $
Author:
William Lee

Constructor Summary
PortaViewClient()
          The viewer server that contains all data about the connections.
 
Method Summary
 AlbumCollection getAlbumsFromMaster()
          Returns a list of AlbumModels from the master.
 void getPhotoFromMaster(SlideSettings ss, org.apache.xmlrpc.AsyncCallback callback)
          Tries to retrieve the full image from the master.
 void getPhotoWithName(java.lang.String album, java.lang.String name, org.apache.xmlrpc.AsyncCallback callback)
          Retrieves the photo with a given name.
 boolean registerWithMaster()
          Register this PortaView with the master.
 boolean unregisterWithMaster()
          Unregister this PortaView with the master.
 void updatePortaViewModel(PortaViewModel model)
          Updates the remote PortaView model.
 void updateRemotePortaView(PortaViewModel pvm)
          Updates the remote portaview with the portaview's settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortaViewClient

public PortaViewClient()
The viewer server that contains all data about the connections. Note that the client depends on the server instance recorded in the registry. You need to call the Registry.setSever() first

Method Detail

updatePortaViewModel

public void updatePortaViewModel(PortaViewModel model)
Updates the remote PortaView model. We usually do this when the model has changed and we want to notify the remote PortaView about this change.

Parameters:
model - the model to update.

registerWithMaster

public boolean registerWithMaster()
Register this PortaView with the master.

Returns:
true if registration is successful, false otherwise.

unregisterWithMaster

public boolean unregisterWithMaster()
Unregister this PortaView with the master.

Returns:
true if successfully unregistered from master, false otherwise.

getPhotoWithName

public void getPhotoWithName(java.lang.String album,
                             java.lang.String name,
                             org.apache.xmlrpc.AsyncCallback callback)
Retrieves the photo with a given name.

Parameters:
album - album name
name - photo name
callback - async callback that handles the return of the XML-RPC call.

getAlbumsFromMaster

public AlbumCollection getAlbumsFromMaster()
Returns a list of AlbumModels from the master.


updateRemotePortaView

public void updateRemotePortaView(PortaViewModel pvm)
Updates the remote portaview with the portaview's settings.

Parameters:
pvm - PortaViewModel that is used to update the remote PortaView.

getPhotoFromMaster

public void getPhotoFromMaster(SlideSettings ss,
                               org.apache.xmlrpc.AsyncCallback callback)
Tries to retrieve the full image from the master. This uses an asynchronous XML-RPC call to retrieve the image, since potentially it can be big and take a long time.



Copyright © 2003 The PortaView Team. All Rights Reserved.