edu.wisc.trace.urcsdk.client
Interface IClientTun

All Known Implementing Classes:
AbstractClientTun, Upnp2sClientTun, UpnpAvTun

public interface IClientTun

IClientTun Implement this interface to create a Client Tun for a specific networking platform. See Upnp2sClientTun for an example.

Author:
Parikshit Thakur & team

Method Summary
 void abortSession(java.lang.String sessionId)
          Called when the Target ends a session.
 void acknowledgeNotification(java.lang.String sessionId, IUISocketElement socketElement)
          Called to alert the Target that a notification has been acknowledged
 void closeSession(java.lang.String sessionId)
          Called to alert the Target that the Client wants to close the session.
 void configureForClient(IClient client, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
          Called by the ClientTunManager, when first time a Client calls the ClientTunManager's bindToClientTun method.
 java.lang.Object getElementState(java.lang.String sessionId, java.lang.String elementId)
          Called to retrieve the current value of a state element
 java.util.List<TargetMirror> getRegisteredTargets()
          Returns the List of Targets discovered by this TUN
 java.lang.String invokeCommandRequest(IUISocketElement socketElement)
          Should be implemented by the underlying network specific layer to indicate to the target that the user has invoked a commmand.
 void invokeLocator(java.lang.String locatorId, java.lang.String targetName)
          Should be implemented by the underlying network specific layer to invoke the Locator on the Target
 ClientSession openSessionRequest(IClient client, TargetMirror target, UISocketMirror socket)
          Should be implemented by the underlying network specific layer to open a new Session with the Target
 boolean setElementStateRequest(IUISocketElement socketElement)
          Should be implemented by the underlying network specific layer to indicate to the target that the user would like to change a state element.
 void setListener(IClientTunListener clientTunListener)
          Sets the listener for this ClientTun
 void targetDiscarded(java.lang.String targetId)
          Called when a Target unregisters itself from the network.
 void targetDiscovered(java.net.URI tdUri, java.lang.String targetId)
          Called when a new Target is discovered on the network.
 void unbindClient(IClient client)
          Called by the ClientTunManager, when Client calls the ClientTunManager's unbindClientTun method.
 void updateElementCsvList(java.lang.String sessionId, java.lang.String elementIdCsvList, java.lang.String valueCsvList)
          Called when the Target sends accumulated update using CSV list
 void updateElementState(java.lang.String sessionId, java.lang.String elementId, java.lang.Object elementValues)
          Called when the Target updates the value of a state element.
 

Method Detail

abortSession

void abortSession(java.lang.String sessionId)
Called when the Target ends a session.

Parameters:
sessionId - a String value

targetDiscovered

void targetDiscovered(java.net.URI tdUri,
                      java.lang.String targetId)
Called when a new Target is discovered on the network.

Parameters:
tdUri - an URI value
targetId - a String value
Throws:
UrcException

updateElementState

void updateElementState(java.lang.String sessionId,
                        java.lang.String elementId,
                        java.lang.Object elementValues)
Called when the Target updates the value of a state element.

Parameters:
sessionId - a String value
elementId - a String value
elementValues - an Object array containing propogated values

updateElementCsvList

void updateElementCsvList(java.lang.String sessionId,
                          java.lang.String elementIdCsvList,
                          java.lang.String valueCsvList)
Called when the Target sends accumulated update using CSV list

Parameters:
sessionId - a String value
elementIdCsvList - a String with CSV
valueCsvList - a String with CSV

targetDiscarded

void targetDiscarded(java.lang.String targetId)
Called when a Target unregisters itself from the network.

Parameters:
targetId - a String value

acknowledgeNotification

void acknowledgeNotification(java.lang.String sessionId,
                             IUISocketElement socketElement)
                             throws UrcException
Called to alert the Target that a notification has been acknowledged

Parameters:
sessionId - a String value
socketElement - an IUISocketElement value
Throws:
UrcException

closeSession

void closeSession(java.lang.String sessionId)
                  throws UrcException
Called to alert the Target that the Client wants to close the session.

Parameters:
sessionId - a String value
Throws:
UrcException

getElementState

java.lang.Object getElementState(java.lang.String sessionId,
                                 java.lang.String elementId)
                                 throws UrcException
Called to retrieve the current value of a state element

Parameters:
sessionId - a String value
elementId - a String value
Returns:
a Object value
Throws:
UrcException

invokeCommandRequest

java.lang.String invokeCommandRequest(IUISocketElement socketElement)
                                      throws UrcException
Should be implemented by the underlying network specific layer to indicate to the target that the user has invoked a commmand.

Parameters:
socketElement - an IUISocketElement value
Returns:
The status of an invoked Command
Throws:
UrcException

setElementStateRequest

boolean setElementStateRequest(IUISocketElement socketElement)
                               throws UrcException
Should be implemented by the underlying network specific layer to indicate to the target that the user would like to change a state element.

Parameters:
socketElement - an IUISocketElement value
Returns:
True if the request was successful
Throws:
UrcException

invokeLocator

void invokeLocator(java.lang.String locatorId,
                   java.lang.String targetName)
                   throws UrcException
Should be implemented by the underlying network specific layer to invoke the Locator on the Target

Parameters:
locatorId -
targetName -
Throws:
UrcException

openSessionRequest

ClientSession openSessionRequest(IClient client,
                                 TargetMirror target,
                                 UISocketMirror socket)
                                 throws UrcException
Should be implemented by the underlying network specific layer to open a new Session with the Target

Parameters:
target -
socket -
Returns:
a ClientSession value
Throws:
UrcException

getRegisteredTargets

java.util.List<TargetMirror> getRegisteredTargets()
Returns the List of Targets discovered by this TUN

Returns:
a List of TargetMirror

setListener

void setListener(IClientTunListener clientTunListener)
Sets the listener for this ClientTun

Parameters:
clientTunListener - a IClientTunListener value

configureForClient

void configureForClient(IClient client,
                        java.util.Map<java.lang.String,java.lang.Object> parameterMap)
                        throws UrcException
Called by the ClientTunManager, when first time a Client calls the ClientTunManager's bindToClientTun method.

Parameters:
client -
parameterMap - a Map
Throws:
UrcException

unbindClient

void unbindClient(IClient client)
                  throws UrcException
Called by the ClientTunManager, when Client calls the ClientTunManager's unbindClientTun method.

Parameters:
client - a IClient value
Throws:
UrcException


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