edu.wisc.trace.uch
Interface IUIPMListener

All Known Implementing Classes:
UCH

public interface IUIPMListener

IUIPMListener forwards call of the methods from UIPM to relative TA.

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

Method Summary
 boolean addCompatibleUI(String targetId, List<String> socketNames, String protocolShortName, List<String> uris, Map<String,String> protocolInfo)
          Tell the UCH to add a user interface item (advertised by the UIPM) to its UIList which is exposed to controllers on request.
 void closeSession(String sessionId)
          Closes a Session with the Target.
 List<String> getAvailableTargetIds()
          Get the identifiers of the available targets.
 boolean getDependencyValue(String sessionId, String path, String dependency)
          Get the actual value of a dependency.
 String getDocument(String uri, String postData)
          Get specified document through HTTP GET or POST.
 String getElementRef(String sessionId, String path)
          Get the elementRef URI that points to a particular socket element/set.
 List<Set<String>> getIndices(String sessionId, List<String> eltIds, List<Integer> indexNos)
          Get IndexNames available on specific level of dimension of dimensional Element.
 String getIpAddress()
          Get the IP address of the UCH.
 IUCHStore getLocalUCHStore()
          Get the Local UCH Store.
 Map<String,String> getLocators(String targetName)
          Get a map with Locator ids and locator types for a specific target type.
 List<Map<String,Object>> getResources(String sessionId, List<Map<String,String>> resProps)
          Returns the matching Resource with the Resource Properties specified by 'resProps'.
 String getSocketDescriptionUri(String targetName, String socketName)
          Get the URI for retrieving the Socket Description of specified targetName and socketName.
 String getSocketFriendlyName(String targetId, String socketName)
          Get Friendly Name for the Socket specified by the socketName and targetId.
 String getSocketName(String sessionId)
          Get the SocketName for the specified sessionId.
 List<String> getSocketNames(String targetName)
          Returns List of socket Names for the specified Target Name.
 String getTargetDescriptionUri(String targetName)
          Get the URI for the Target Description for the specified targetName.
 String getTargetName(String targetId)
          Get the name of a target for the specified targetId.
 Map<String,Object> getTargetProps(String targetId)
          Get the target Properties for the specified targetId.
 Map<String,String> getUCHProps()
          Get a Map or UCH Properties.
 Map<String,String> getValues(String sessionId, List<String> paths)
          Returns a value/state of the specified socket elements.
 void invokeLocator(String targetId, String locatorId)
          Invoke the specified locator function on the specified target.
 boolean isElementAvailable(String targetId, String socketName, String eltId)
          Checks whether a given socketElement is available in specified Socket of specified Target or not.
 boolean isImplemented(String functionName)
          Return whether specified function is implemented or not.
 boolean isSessionResumable(String sessionId)
          Check whether the given session can be resumed.
 boolean isSessionSuspendable(String sessionId)
          Check whether the given session can be suspended.
 Map<String,String> openSessionRequest(IUIPM uipm, String targetId, String socketName, Map<String,String> clientProps)
          Request for opening a session with the specified target and socket.
 void removeCompatibleUIs(List<String> uris)
          Tells the UCH to remove user interface URIs from the UIList that were previously added by one call to addCompatibleUI().
 void removeUIPM(IUIPM uipm)
           
 boolean resumeSession(String sessionId)
          The target is requested to resume the given session.
 Map<String,List<String>> setValuesRequest(String sessionId, List<String> paths, List<String> operations, List<String> reqValues)
          The UIPM requests to change the target state in one or more operations on specified socket elements.
 String startUriService(IUIPM uipm, String scheme, int port, boolean portIsFlexible, String basePath, boolean basePathIsFlexible)
          The UIPM 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 UIPM requests the UCH to stop servicing a URI that was requested to be serviced in a previous call to startUriService().
 long suspendSession(String sessionId, long suggestedTimeout)
          The target is requested to suspend the given session with a suggested timeout value.
 boolean validateValue(String sessionId, String path, String value)
          Checks whether value is valid or not.
 

Method Detail

getAvailableTargetIds

List<String> getAvailableTargetIds()
Get the identifiers of the available targets.

Returns:
List<String>

getTargetName

String getTargetName(String targetId)
Get the name of a target for the specified targetId.

Parameters:
targetId - a String value of targetId
Returns:
a String

getTargetProps

Map<String,Object> getTargetProps(String targetId)
Get the target Properties for the specified targetId.

Parameters:
targetId - a String value of targetId
Returns:
Map<String, Object>

getTargetDescriptionUri

String getTargetDescriptionUri(String targetName)
Get the URI for the Target Description for the specified targetName.

Parameters:
targetName - a String value of targetName
Returns:
a Target Description URI String

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

getSocketNames

List<String> getSocketNames(String targetName)
Returns List of socket Names for the specified Target Name.

Parameters:
targetName - a String value of targetName
Returns:
List<String>

getSocketDescriptionUri

String getSocketDescriptionUri(String targetName,
                               String socketName)
Get the URI for retrieving the Socket Description of specified targetName and socketName.

Parameters:
targetName - a String value of targetName
socketName - a String value of socketName
Returns:
a String representing Socket Description URI
Throws:
TAFatalException

getSocketName

String getSocketName(String sessionId)
Get the SocketName for the specified sessionId.

Parameters:
sessionId - a String value of sessionId
Returns:
a String of SocketName
Throws:
TAFatalException

getSocketFriendlyName

String getSocketFriendlyName(String targetId,
                             String socketName)
Get Friendly Name for the Socket specified by the socketName and targetId.

Parameters:
targetId - a String value of targetId
socketName - a String value of socketName
Returns:
a String value of Socket Friendly Name

isElementAvailable

boolean isElementAvailable(String targetId,
                           String socketName,
                           String eltId)
Checks whether a given socketElement is available in specified Socket of specified Target or not.

Parameters:
targetId - a String value of targetId
socketName - a String value of socketName
eltId - a String value of eltId
Returns:
boolean whether specified socketElement is exists or not
Throws:
TAFatalException

getResources

List<Map<String,Object>> getResources(String sessionId,
                                      List<Map<String,String>> resProps)
Returns the matching Resource with the Resource Properties specified by 'resProps'.

Parameters:
sessionId - a String value of SessionId
resProps - List<Map<String, String>> of Resource Properties
Returns:
an List<Map<String,Object>> representing Resources

openSessionRequest

Map<String,String> openSessionRequest(IUIPM uipm,
                                      String targetId,
                                      String socketName,
                                      Map<String,String> clientProps)
Request for opening a session with the specified target and socket.

Parameters:
targetId - a String value of targetId
socketName - a String value of socketName
clientProps - Map<String,String>
Returns:
Map<String,String>

closeSession

void closeSession(String sessionId)
Closes a Session with the Target.

Parameters:
sessionId - a String value of sessionId

getIndices

List<Set<String>> getIndices(String sessionId,
                             List<String> eltIds,
                             List<Integer> indexNos)
Get IndexNames available on specific level of dimension of dimensional Element.

Parameters:
sessionId - a String value of sessionId
eltIds - a List<String> of elementIds
indexNos - a List<Integer> of indexNo
Returns:
a List<Set<Integer> of indices

getValues

Map<String,String> getValues(String sessionId,
                             List<String> paths)
Returns a value/state of the specified socket elements.

Parameters:
sessionId - a String value of sessionId
paths - a List<String> of elementPath
Returns:
a Map<String, String> of values
Throws:
TAFatalException

setValuesRequest

Map<String,List<String>> setValuesRequest(String sessionId,
                                          List<String> paths,
                                          List<String> operations,
                                          List<String> reqValues)
The UIPM requests to change the target state in one or more operations on specified socket elements. The requested operations are coded as cross-indexed arrays of paths, operation identifiers and requested new values.

Parameters:
sessionId - a String value of sessionId
paths - List<String> a List of elementPaths
operations - List<String> a List of operations (allowed operations are "S", "A", "R", "I" or "K" )
reqValues - List<String> a List of Requested Values
Returns:
Map<String, List<String>> a Map of set Values

addCompatibleUI

boolean addCompatibleUI(String targetId,
                        List<String> socketNames,
                        String protocolShortName,
                        List<String> uris,
                        Map<String,String> protocolInfo)
                        throws UCHException
Tell the UCH to add a user interface item (advertised by the UIPM) to its UIList which is exposed to controllers on request.

Parameters:
targetId - a String value of targetId
socketNames - a List<String> value of socketNames
protocolShortName - a String value of protocolShortName
uris - a List<String> value of uris
protocolInfo - a Map<String, String> of protocol Information
Returns:
whether CompatibleUI is added or not.
Throws:
UCHException

removeCompatibleUIs

void removeCompatibleUIs(List<String> uris)
                         throws UCHException
Tells the UCH to remove user interface URIs from the UIList that were previously added by one call to addCompatibleUI().

Parameters:
uris - a List<String> of URIs
Throws:
UCHException

getLocalUCHStore

IUCHStore getLocalUCHStore()
Get the Local UCH Store.

Returns:
an Object of IUCHStore

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

getIpAddress

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

Returns:
return a string value

startUriService

String startUriService(IUIPM uipm,
                       String scheme,
                       int port,
                       boolean portIsFlexible,
                       String basePath,
                       boolean basePathIsFlexible)
                       throws UCHException
The UIPM 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:
uipm - an IUIPM 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
Returns:
a String value of URI
Throws:
UCHException

stopUriService

void stopUriService(String uri)
                    throws UCHException
The UIPM 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

getLocators

Map<String,String> getLocators(String targetName)
Get a map with Locator ids and locator types for a specific target type.

Parameters:
targetName - a String value of targetName
Returns:
a Map<string, String> of LocatorID V/S Locator Type

invokeLocator

void invokeLocator(String targetId,
                   String locatorId)
Invoke the specified locator function on the specified target.

Parameters:
targetId - a String value of TargetId
locatorId - a String value of LocatorId

getUCHProps

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

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

validateValue

boolean validateValue(String sessionId,
                      String path,
                      String value)
                      throws UCHNotImplementedException
Checks whether value is valid or not. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
path - a String value of path
value - a String value
Returns:
whether the value is valid or not.
Throws:
UCHNotImplementedException

getDependencyValue

boolean getDependencyValue(String sessionId,
                           String path,
                           String dependency)
                           throws UCHNotImplementedException
Get the actual value of a dependency. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
path - a String value of path
dependency - a String value of dependency
Returns:
whether the dependency is true or false.
Throws:
UCHNotImplementedException

getElementRef

String getElementRef(String sessionId,
                     String path)
                     throws UCHNotImplementedException
Get the elementRef URI that points to a particular socket element/set. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
path - a String value of path
Returns:
a String value of elementRef
Throws:
UCHNotImplementedException

isSessionSuspendable

boolean isSessionSuspendable(String sessionId)
                             throws UCHNotImplementedException
Check whether the given session can be suspended. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
Returns:
whether the given session can be suspended or not
Throws:
UCHNotImplementedException

suspendSession

long suspendSession(String sessionId,
                    long suggestedTimeout)
                    throws UCHNotImplementedException
The target is requested to suspend the given session with a suggested timeout value. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
suggestedTimeout - a long value
Returns:
a long value of timeOut
Throws:
UCHNotImplementedException

isSessionResumable

boolean isSessionResumable(String sessionId)
                           throws UCHNotImplementedException
Check whether the given session can be resumed. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
Returns:
whether the given session can be resumed or not
Throws:
UCHNotImplementedException

resumeSession

boolean resumeSession(String sessionId)
                      throws UCHNotImplementedException
The target is requested to resume the given session. If IUIPMListener does not support this function then throw UCHNotImplementedException.

Parameters:
sessionId - a String value of sessionId
Returns:
whether request for resume session is granted or not.
Throws:
UCHNotImplementedException

removeUIPM

void removeUIPM(IUIPM uipm)
Parameters:
uipm - an Object of IUIPM


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