edu.wisc.trace.urcsdk.target
Class GenericTarget

java.lang.Object
  extended by edu.wisc.trace.urcsdk.target.GenericTarget
All Implemented Interfaces:
ITarget

public class GenericTarget
extends java.lang.Object
implements ITarget

An generic version of a Target

Version:
$Revision: 1.21 $
Author:
Matt Doermann Modified by: Parikshit Thakur

Field Summary
protected  java.util.logging.Logger logger
           
protected  java.util.List<ITargetTun> targetTuns
           
protected  java.util.List<UISocket> uiSockets
           
 
Constructor Summary
GenericTarget(java.net.URL codeBase, java.net.URI tdLocation)
          Creates a new GenericTarget instance.
 
Method Summary
 void abortSession(java.lang.String sessionId)
          abortSession receives a call from UISocket and forwards it to TargetTunManager
 ITargetTun bindToTargetTun(java.lang.String tunClassName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Binds the Target to a particular TUN
 java.lang.String generateSessionId()
          Generates a unique session Id based on the number of sessions and the current time.
 java.lang.String getName()
          Get the Name of the Target i.e.
 TargetSession getSessionById(java.lang.String sessionId)
          Returns the TargetSession for the sessionId
 java.net.URI getTdUri()
          Returns the URI for the target's TD document.
 java.util.List<UISocket> getUISockets()
          Returns a list of the sockets currently being served by the target.
 void invokeLocator(java.lang.String locatorId)
          Invokes the Locator of the Target
 void unbindTargetTun(java.lang.String tunClassName)
          Unbinds the Target from a particular TUN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger

targetTuns

protected java.util.List<ITargetTun> targetTuns

uiSockets

protected java.util.List<UISocket> uiSockets
Constructor Detail

GenericTarget

public GenericTarget(java.net.URL codeBase,
                     java.net.URI tdLocation)
Creates a new GenericTarget instance.

Parameters:
tdLocation - The URI for the TD Document.
Method Detail

generateSessionId

public java.lang.String generateSessionId()
Description copied from interface: ITarget
Generates a unique session Id based on the number of sessions and the current time.

Specified by:
generateSessionId in interface ITarget
Returns:
The generated session Id

getTdUri

public java.net.URI getTdUri()
Description copied from interface: ITarget
Returns the URI for the target's TD document.

Specified by:
getTdUri in interface ITarget
Returns:
The URI of the TD document.

getUISockets

public java.util.List<UISocket> getUISockets()
Description copied from interface: ITarget
Returns a list of the sockets currently being served by the target.

Specified by:
getUISockets in interface ITarget
Returns:
A List of sockets currently being used by the target.

invokeLocator

public void invokeLocator(java.lang.String locatorId)
Description copied from interface: ITarget
Invokes the Locator of the Target

Specified by:
invokeLocator in interface ITarget

getName

public java.lang.String getName()
Description copied from interface: ITarget
Get the Name of the Target i.e. the value of the 'about' attribute of 'target' tag in the td.xml

Specified by:
getName in interface ITarget
Returns:
TargetName

getSessionById

public TargetSession getSessionById(java.lang.String sessionId)
Returns the TargetSession for the sessionId

Parameters:
sessionId -
Returns:
TargetSession

abortSession

public void abortSession(java.lang.String sessionId)
                  throws UrcException
Description copied from interface: ITarget
abortSession receives a call from UISocket and forwards it to TargetTunManager

Specified by:
abortSession in interface ITarget
Parameters:
sessionId - a String value
Throws:
UrcException

bindToTargetTun

public ITargetTun bindToTargetTun(java.lang.String tunClassName,
                                  java.util.Map<java.lang.String,java.lang.Object> parameters)
                           throws UrcException
Binds the Target to a particular TUN

Parameters:
tunClassName - Fully qualified TUN Class Name
parameters -
Throws:
UrcException

unbindTargetTun

public void unbindTargetTun(java.lang.String tunClassName)
                     throws UrcException
Unbinds the Target from a particular TUN

Parameters:
tunClassName - Fully qualified TUN Class Name
Throws:
UrcException


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