org.coffeecrew.mobile.oop.impl
Class ReceiverRequestHandler

java.lang.Object
  extended by de.avetana.javax.obex.ServerRequestHandler
      extended by org.coffeecrew.mobile.oop.impl.ReceiverRequestHandler

public class ReceiverRequestHandler
extends de.avetana.javax.obex.ServerRequestHandler

This class is use internally by ObjectReceiver. But can be use as a request handler for put operations

Since:
0.1

Constructor Summary
ReceiverRequestHandler(java.util.Vector receivedObjectsStore, de.avetana.javax.obex.SessionNotifier sn)
          Creates a new instance of ReceiverRequestHandler
 
Method Summary
 int onPut(de.avetana.javax.obex.Operation operation)
          This request handler should only be ware of handling put operations.
 
Methods inherited from class de.avetana.javax.obex.ServerRequestHandler
createHeaderSet, getConnectionID, onAuthenticationFailure, onConnect, onDelete, onDisconnect, onGet, onSetPath, setConnectionID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceiverRequestHandler

public ReceiverRequestHandler(java.util.Vector receivedObjectsStore,
                              de.avetana.javax.obex.SessionNotifier sn)
Creates a new instance of ReceiverRequestHandler

Parameters:
receivedObjectsStore - The java.util.Vector to which the received objects are stored.
sn - The session notifier to synchronize the threads
Method Detail

onPut

public int onPut(de.avetana.javax.obex.Operation operation)
This request handler should only be ware of handling put operations. This method implements the put operationa an all necessary steps to reconstruct the object received from a ObjectPusher

Overrides:
onPut in class de.avetana.javax.obex.ServerRequestHandler
Parameters:
operation - The headers sent by the client
Returns:
Response code as defined in ResponseCodes. In this case only OBEX_HTTP_OK