org.coffeecrew.mobile.oop.impl
Class ObjectPusher

java.lang.Object
  extended by org.coffeecrew.mobile.oop.util.Observable
      extended by org.coffeecrew.mobile.oop.impl.ObjectPusher
All Implemented Interfaces:
java.lang.Runnable

public class ObjectPusher
extends Observable
implements java.lang.Runnable

This class is intended to be used to transfer a single object which implements IObexObjectPassing to a remote device which has an instance of ObjectReceiver running The transfer runns of in a separate thread. The calling object can be notified if the transfer finished, if it implements the Observer interface.

Since:
0.1
See Also:
IObexObjectPassing, ObjectReceiver, BulkObjectPusher

Constructor Summary
ObjectPusher(java.lang.Object transferObject)
          Creates a new instance of ObjectPusher This class pushes the given Object to the given device address once it is createt it will run as a seperate thread.
 
Method Summary
 void run()
          The actual execution method which transfers the object to the remote device.
 
Methods inherited from class org.coffeecrew.mobile.oop.util.Observable
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

ObjectPusher

public ObjectPusher(java.lang.Object transferObject)
             throws ObjectNotPassableException
Creates a new instance of ObjectPusher This class pushes the given Object to the given device address once it is createt it will run as a seperate thread.

Parameters:
transferObject - Object to push to receiving client (needs to implement IObexObjectPassing
Throws:
ObjectNotPassableException - if the object to transfer does not implement IObexObjectPassing
Method Detail

run

public void run()
The actual execution method which transfers the object to the remote device.

Specified by:
run in interface java.lang.Runnable