org.myurc.uch
Interface ITAListener

All Known Implementing Classes:
TAListener

public interface ITAListener

ITAListener receives calls from TA. UCH implements this interface. The Listener receives calls from TA and forwards them to the UIPM and thereby to the client.

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

Method Summary
 void abortSession(String sessionId)
          The TA has terminated a session, when the TA will have no knowledge about that session.
 void addUriServiceContexts(String uri, List<Map<String,IProfile>> contexts)
          Called when the TA wants to add one or more contexts to a URI service.
 String getDocument(String uri, String postData, Map<String,IProfile> context)
          Get specified document through HTTP GET or POST.
 String getIpAddress()
          Get the IP address of the UCH.
 IUCHStore getLocalUCHStore()
          Gets an Object of LocalUCHStore.
 List<List<Map<String,List<String>>>> getResources(String sessionId, List<Map<String,List<String>>> resProps)
          Get resource from the UCH specified by Resource Properties.
 List<Map<String,IProfile>> getTargetContexts(String targetId)
          Get list of contexts for specified target.
 Map<String,String> getUCHProps()
          Get a Map of UCH Properties.
 boolean isImplemented(String functionName)
          Returns whether specified function is implemented or not.
 void removeUriServiceContexts(String uri, List<Map<String,IProfile>> contexts)
          Called when the TA wants to remove one or more contexts to a URI service.
 void sessionForwardRequest(String sessionId, Map<String,String> forwardInfo)
          The TA requests the client to open a session with different socket.
 boolean setValidation(ITA ta, boolean activate)
          Check whether to do validation for the TA or not.
 String startUriService(ITA ta, String scheme, int port, boolean portIsFlexible, String basePath, boolean basePathIsFlexible, List<Map<String,IProfile>> contexts)
          The ITA 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 ITA requests the UCH to stop servicing a URI that was requested to be serviced in a previous call to startUriService().
 void updateDynRes(List<String> sessionIds, List<String> eltIds)
          Signals that the set of resources pertaining to a specific socket element has been changed.
 void updateValues(List<String> sessionIds, List<String> paths, List<String> operations, List<String> values, List<Boolean> hasDynRes)
          The TA signals a change in the target’s status, affecting one or more sessions.
 List<Map<String,String>> uploadResources(List<Map<String,List<String>>> props, List<String> resourceUri)
          Upload Resources on Resource Server.
 

Method Detail

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

sessionForwardRequest

void sessionForwardRequest(String sessionId,
                           Map<String,String> forwardInfo)
The TA requests the client to open a session with different socket.

Parameters:
sessionId - a String value of sessionId
forwardInfo - Map<String, String>

abortSession

void abortSession(String sessionId)
The TA has terminated a session, when the TA will have no knowledge about that session.

Parameters:
sessionId - a String value of sessionId

updateValues

void updateValues(List<String> sessionIds,
                  List<String> paths,
                  List<String> operations,
                  List<String> values,
                  List<Boolean> hasDynRes)
The TA signals a change in the target’s status, affecting one or more sessions.

Parameters:
sessionIds - a List<String> of sessionIds
paths - a List<String> of paths
operations - a List<String> of operations
values - a List<String> of values
hasDynRes - a List<Boolean> of hasDynRes

updateDynRes

void updateDynRes(List<String> sessionIds,
                  List<String> eltIds)
Signals that the set of resources pertaining to a specific socket element has been changed.

Parameters:
sessionIds - a List<String> of sessionIds
eltIds - a List<String> of elementIds

getLocalUCHStore

IUCHStore getLocalUCHStore()
Gets an Object of LocalUCHStore.

Returns:
an Object of IUCHStore

setValidation

boolean setValidation(ITA ta,
                      boolean activate)
Check whether to do validation for the TA or not.

Parameters:
ta - an Object of ITA
activate - a boolean value of activate
Returns:
boolean whether to do validation for the TA or not

getIpAddress

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

Returns:
return a string value

startUriService

String startUriService(ITA ta,
                       String scheme,
                       int port,
                       boolean portIsFlexible,
                       String basePath,
                       boolean basePathIsFlexible,
                       List<Map<String,IProfile>> contexts)
                       throws UCHException
The ITA 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:
ta - an ITA object
scheme - a String value of schema
port - a port no
portIsFlexible - a boolean value
basePath - a String value of basePath
basePathIsFlexible - a boolean value
contexts - a List<Map<String, IProfile>> of user and controller profile map
Returns:
a String value of URI
Throws:
UCHException - an Object of UCHException

addUriServiceContexts

void addUriServiceContexts(String uri,
                           List<Map<String,IProfile>> contexts)
                           throws UCHException
Called when the TA wants to add one or more contexts to a URI service.

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

removeUriServiceContexts

void removeUriServiceContexts(String uri,
                              List<Map<String,IProfile>> contexts)
                              throws UCHException
Called when the TA wants to remove one or more contexts to a URI service.

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

stopUriService

void stopUriService(String uri)
                    throws UCHException
The ITA 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 - an Object of UCHException

getResources

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

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

getDocument

String getDocument(String uri,
                   String postData,
                   Map<String,IProfile> context)
                   throws UCHException
Get specified document through HTTP GET or POST.

Parameters:
uri - a String value of URI
postData - a String value of postData
context - a Map<String, IProfile> of user and controller profile
Returns:
a String value of requested Document
Throws:
UCHException - an Object of UCHException

getUCHProps

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

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

isImplemented

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

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

uploadResources

List<Map<String,String>> uploadResources(List<Map<String,List<String>>> props,
                                         List<String> resourceUri)
Upload Resources on Resource Server.

Parameters:
props - an Object of List<Map<String, List<String>>>
resourceUri - an Object of List<String>
Returns:
an Object of Map<String, String>


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