Class ObjectReceiver

  extended by
      extended by
All Implemented Interfaces:

public class ObjectReceiver
extends Observable
implements java.lang.Runnable

This class should be used on the receiving side of the transfer. This class is observable, so you can attach an Observer object to it, to be notified if an object was received.
ObjectReceiver usage is pretty simple, you just have to instance it like:

new ObjectReceiver(receivedObjects);
or if you want an Observer to be attached, simply do:
new ObjectReceiver(receivedObjects).addObserver(observer);


Constructor Summary
ObjectReceiver(java.util.Vector receivedObjects)
          Creates a new instance of ObjectReceiver.
Method Summary
 void run()
          Starts the receiving thread.
Methods inherited from class
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ObjectReceiver(java.util.Vector receivedObjects)
Creates a new instance of ObjectReceiver. This class is responsible for receiving the object that is send to the remote device with the ObjectPusher class
Remember to enable discovery mode, this MAY not be required on a real phone but if using in WTK this is needed.

receivedObjects - The received object will be added to this vector which can hold lots of objects you receive.
Method Detail


public void run()
Starts the receiving thread. Sets the device discoverable.

Specified by:
run in interface java.lang.Runnable