edu.wisc.trace.urcsdk.target
Interface ITargetTun

All Known Implementing Classes:
Upnp2sTargetTun

public interface ITargetTun

ITargetTun TargetTun implementors have to implement this Interface

Version:
$Revision: 1.21 $
Author:
Parikshit Thakur & Team

Method Summary
 void abortSession(java.lang.String sessionId)
          abortSession is called when the target needs to close a session on the Client.
 void acknowledgeNotification(java.lang.String sessionId, java.lang.String elementId)
          acknowledgeNotification is called from the lower level of the Tun, when a Client wants to acknowledge a Notification
 void closeSession(java.lang.String sessionId)
          closeSession is called from the lower level of the Tun, when a Client needs to close a session.
 void configureForTarget(ITarget target, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
          configureForTarget is called by the TargetTunManager, when first time a Target calls the TargetTunManager's bindtoTun method.
 java.lang.Object getElementState(java.lang.String sessionId, java.lang.String elementId)
          getElementState is an incoming call from the lower levels of the Tun, from a Client that needs the current value of a SocketElement
 java.lang.String invokeCommandRequest(java.lang.String sessionId, java.lang.String elementId)
          invokeCommandRequest is called from the lower level of the Tun, when a Client wants to invoke a command
 void invokeLocator(java.lang.String targetName, java.lang.String locatorId)
          invokeLocator is called from the lower level of the Tun, when a Client wants to invoke a Locator on the Target.
 java.lang.String openSessionRequest(java.lang.String targetName, java.lang.String socketName, java.lang.String clientUdn)
          openSessionRequest is called from the lower level of the Tun, when a Client needs to open a session.
 void propagateUpdates(java.lang.String sessionId, java.util.HashMap<java.lang.String,java.lang.Object> accUpdateMap)
          This method is called to send bulk accumulated updates to the Client
 boolean setElementStateRequest(java.lang.String sessionId, java.lang.String elementId, java.lang.Object value)
          setElementStateRequest is called from the lower level of the Tun, when a Client wants to set the value of a stateElement.
 void setListener(ITargetTunListener targetTunListener)
          setListener Sets the Listener for this Tun
 void unbindTarget(ITarget target)
          unbindTarget is called by the TargetTunManager, when Target calls the TargetTunManager's unbindTargetTun method.
 void updateElementState(java.lang.String sessionId, IUISocketElement element)
          updateElementState is called to alert a Client of a change to a socketElement.
 

Method Detail

abortSession

void abortSession(java.lang.String sessionId)
                  throws UrcException
abortSession is called when the target needs to close a session on the Client. Need not be called if the Client has requested the session be closed.

Parameters:
sessionId - a String value
Throws:
UrcException

closeSession

void closeSession(java.lang.String sessionId)
closeSession is called from the lower level of the Tun, when a Client needs to close a session.

Parameters:
sessionId - a String value

getElementState

java.lang.Object getElementState(java.lang.String sessionId,
                                 java.lang.String elementId)
getElementState is an incoming call from the lower levels of the Tun, from a Client that needs the current value of a SocketElement

Parameters:
sessionId - a String value
elementId - a String value
Returns:
an Object Value

openSessionRequest

java.lang.String openSessionRequest(java.lang.String targetName,
                                    java.lang.String socketName,
                                    java.lang.String clientUdn)
openSessionRequest is called from the lower level of the Tun, when a Client needs to open a session.

Parameters:
targetName - a String value
socketName - a String value
clientUdn - a String value
Returns:
a String sessionId

setElementStateRequest

boolean setElementStateRequest(java.lang.String sessionId,
                               java.lang.String elementId,
                               java.lang.Object value)
setElementStateRequest is called from the lower level of the Tun, when a Client wants to set the value of a stateElement.

Parameters:
sessionId - a String value
elementId - a String value
value - a Object value
Returns:
a boolean response

updateElementState

void updateElementState(java.lang.String sessionId,
                        IUISocketElement element)
                        throws UrcException
updateElementState is called to alert a Client of a change to a socketElement.

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

propagateUpdates

void propagateUpdates(java.lang.String sessionId,
                      java.util.HashMap<java.lang.String,java.lang.Object> accUpdateMap)
                      throws UrcException
This method is called to send bulk accumulated updates to the Client

Parameters:
sessionId -
accUpdateMap -
Throws:
UrcException

invokeCommandRequest

java.lang.String invokeCommandRequest(java.lang.String sessionId,
                                      java.lang.String elementId)
invokeCommandRequest is called from the lower level of the Tun, when a Client wants to invoke a command

Parameters:
sessionId - a String value
elementId - a String value
Returns:
a String Status

acknowledgeNotification

void acknowledgeNotification(java.lang.String sessionId,
                             java.lang.String elementId)
acknowledgeNotification is called from the lower level of the Tun, when a Client wants to acknowledge a Notification

Parameters:
sessionId - a String value
elementId - a String value

setListener

void setListener(ITargetTunListener targetTunListener)
setListener Sets the Listener for this Tun

Parameters:
targetTunListener - a ITargetTunListener value

configureForTarget

void configureForTarget(ITarget target,
                        java.util.Map<java.lang.String,java.lang.Object> parameterMap)
                        throws UrcException
configureForTarget is called by the TargetTunManager, when first time a Target calls the TargetTunManager's bindtoTun method.

Parameters:
target - a ITarget
parameterMap - a Map
Throws:
UrcException

invokeLocator

void invokeLocator(java.lang.String targetName,
                   java.lang.String locatorId)
invokeLocator is called from the lower level of the Tun, when a Client wants to invoke a Locator on the Target.

Parameters:
targetName - a String
locatorId - a String

unbindTarget

void unbindTarget(ITarget target)
                  throws UrcException
unbindTarget is called by the TargetTunManager, when Target calls the TargetTunManager's unbindTargetTun method.

Parameters:
target - a ITarget
Throws:
UrcException


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