edu.wisc.trace.uch
Interface ITDMListener

All Known Implementing Classes:
TargetListener

public interface ITDMListener

ITDMListener is responsible for listening to the TDM. After getting information from ITDM regarding Discovery and Discarding of devices, ITDMListener forwards the same to the UCH.

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

Method Summary
 String getDocument(String uri, String postData)
          Get specified document through HTTP GET or POST.
 String getIpAddress()
          Get the IP address of the UCH.
 IUCHStore getLocalUCHStore()
          Get the Local UCH Store.
 List<Map<String,Object>> getResources(String sessionId, List<Map<String,String>> resProps)
          Get resource from the UCH specified by Resource Properties.
 Map<String,String> getUCHProps()
          Get a Map or UCH Properties.
 boolean isImplemented(String functionName)
          Return whether specified function is implemented or not.
 String startUriService(ITDM tdm, String scheme, int port, boolean portIsFlexible, String basePath, boolean basePathIsFlexible)
          The ITDM requests the UCH to start servicing a URI which is made up of a given scheme, port, and base path.
 void stopUriService(String uri)
          The ITDM requests the UCH to stop servicing a URI that was requested to be serviced in a previous call to startUriService().
 void targetDiscarded(String targetId)
          A TDM calls this function when a target has disappeared from the network.
 String targetDiscovered(Map<String,Object> targetProps, Map<String,String> taProps)
          This function is called by a TDM when it has discovered a new target and loads appropriate TA for the new target.
 

Method Detail

targetDiscovered

String targetDiscovered(Map<String,Object> targetProps,
                        Map<String,String> taProps)
This function is called by a TDM when it has discovered a new target and loads appropriate TA for the new target. If the corresponding TA is already installed, the new target shall be registered with the already installed TA.

Parameters:
targetProps - a Map<String, Object> of discovered Target Properties
taProps - a Map<String, String> of TA(Target Adapter)'s Properties
Returns:
a String The UCH shall return the targetId (String) that it has assigned the newly discovered target. This may be identical to the property ‘targetInstance’ in targetProps

targetDiscarded

void targetDiscarded(String targetId)
A TDM calls this function when a target has disappeared from the network.

Parameters:
targetId - a String value of targetId

getLocalUCHStore

IUCHStore getLocalUCHStore()
Get the Local UCH Store.

Returns:
an Object of IUCHStore

getIpAddress

String getIpAddress()
Get the IP address of the UCH.

Returns:
return a string value

startUriService

String startUriService(ITDM tdm,
                       String scheme,
                       int port,
                       boolean portIsFlexible,
                       String basePath,
                       boolean basePathIsFlexible)
                       throws UCHException
The ITDM requests the UCH to start servicing a URI which is made up of a given scheme, port, and base path. If successful, the UCH will forward all messages that have this URI as its base, to controllerRequest().

Parameters:
tdm - an Object of ITDM
scheme - a String value of scheme
port - an int value of port number
portIsFlexible - a boolean value
basePath - a String value of basePath
basePathIsFlexible - a boolean value
Returns:
a String value of URI
Throws:
UCHException

stopUriService

void stopUriService(String uri)
                    throws UCHException
The ITDM requests the UCH to stop servicing a URI that was requested to be serviced in a previous call to startUriService().

Parameters:
uri - a String value of URI
Throws:
UCHException

getResources

List<Map<String,Object>> getResources(String sessionId,
                                      List<Map<String,String>> resProps)
Get resource from the UCH specified by Resource Properties.

Parameters:
sessionId - a String value of sessionId
resProps - a Map<String, String> of Resource Properties
Returns:
a Map<String, Object> value

getDocument

String getDocument(String uri,
                   String postData)
                   throws UCHException
Get specified document through HTTP GET or POST.

Parameters:
uri - a String value of URI
postData - a String value of postData
Returns:
a String value of requested Document
Throws:
UCHException

getUCHProps

Map<String,String> getUCHProps()
Get a Map or UCH Properties.

Returns:
an object of Map<String, String> or UCH Properties

isImplemented

boolean isImplemented(String functionName)
Return whether specified function is implemented or not.

Parameters:
functionName - a String value of function Name
Returns:
whether the function is implemented or not


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