org.myurc.uch
Interface ITDM

All Known Implementing Classes:
GenericTDM, UpnpTDM

public interface ITDM

ITDM is responsible for Discovering & Discarding of the devices from the network and forwards call to ITDMListener.

Version:
$Revision: 1.4 $
Author:
Parikshit Thakur & Team, Trace R&D Center

Method Summary
 void contextsClosed(List<Map<String,IProfile>> contexts)
          Called when one or more contexts were closed or have expired on the UCH.
 void contextsOpened(List<Map<String,IProfile>> contexts)
          Called when one or more contexts have been opened on the UCH.
 void finalize()
          It is called before it uninstalls or unloads the TDM.
 List<Map<String,IProfile>> getTargetContexts(String targetId)
          Get list of contexts for specified target.
 Map<String,String> getTDMProps()
          Get TDM Properties Map.
 void init(ITDMListener tdmListener, Map<String,String> tdmProps, Map<String,String> uchProps, List<Map<String,IProfile>> contexts)
          When the TDM is installed and loaded, the UCH calls init() prior to any other TDM function and allows the TDM to initialize itself.
 void startDiscovery()
          This function signals the TDM to start discovery of targets.
 void stopDiscovery()
          This function signals the TDM to stop discovery of targets.
 void targetRequest(HttpServletRequest request, HttpServletResponse response, Map<String,IProfile> context)
          The UCH calls this function if it has received a request from a controller to a URI that the TDM has claimed for itself by a previous call to startUriService().It call desired methods of ITDMListener and make changes to response object.
 

Method Detail

init

void init(ITDMListener tdmListener,
          Map<String,String> tdmProps,
          Map<String,String> uchProps,
          List<Map<String,IProfile>> contexts)
          throws TDMFatalException
When the TDM is installed and loaded, the UCH calls init() prior to any other TDM function and allows the TDM to initialize itself.

Parameters:
tdmListener - an Object of ITDMListener
tdmProps - a Map<String, String> of ITDM Properties
uchProps - a Map<String, String> of UCH Properties
contexts - a List<Map<String, IProfile>> of user and controller profile map
Throws:
TDMFatalException - an Object of TDMFatalException

finalize

void finalize()
It is called before it uninstalls or unloads the TDM.


contextsOpened

void contextsOpened(List<Map<String,IProfile>> contexts)
                    throws TDMFatalException
Called when one or more contexts have been opened on the UCH.

Parameters:
contexts - a List<Map<String, IProfile>> of user and controller profile map
Throws:
TDMFatalException - an Object of TDMFatalException

contextsClosed

void contextsClosed(List<Map<String,IProfile>> contexts)
                    throws TDMFatalException
Called when one or more contexts were closed or have expired on the UCH.

Parameters:
contexts - a List<Map<String, IProfile>> of user and controller profile map
Throws:
TDMFatalException - an Object of TDMFatalException

getTDMProps

Map<String,String> getTDMProps()
Get TDM Properties Map.

Returns:
a object of Map<String, String> of TDM Properties

startDiscovery

void startDiscovery()
                    throws TDMFatalException
This function signals the TDM to start discovery of targets.

Throws:
TDMFatalException - an Object of TDMFatalException

stopDiscovery

void stopDiscovery()
                   throws TDMFatalException
This function signals the TDM to stop discovery of targets.

Throws:
TDMFatalException - an Object of TDMFatalException

getTargetContexts

List<Map<String,IProfile>> getTargetContexts(String targetId)
Get list of contexts for specified target.

Parameters:
targetId - a string value of targetId
Returns:
a List<Map<String, IProfile>> of user and controller profile map

targetRequest

void targetRequest(HttpServletRequest request,
                   HttpServletResponse response,
                   Map<String,IProfile> context)
                   throws TDMFatalException
The UCH calls this function if it has received a request from a controller to a URI that the TDM has claimed for itself by a previous call to startUriService().It call desired methods of ITDMListener and make changes to response object.

Parameters:
request - an Object of HttpServletRequest
response - an Object of HttpServletResponse
context - a Map<String, IProfile> of user and controller profile
Throws:
TDMFatalException


Copyright © 2006-2008 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.