edu.wisc.trace.urcsdk.client
Class TargetMirror

java.lang.Object
  extended by edu.wisc.trace.urcsdk.client.TargetMirror

public class TargetMirror
extends java.lang.Object

TargetMirror is the Target class. It contains all Target-wide settings, methods for accessing a Target's sockets, and ties to the TUN-level for lower-level network access. Created on: Aug 31, 2004

Version:
$Revision: 1.21 $
Author:
Andrew Martin, Trace R&D Center Modified by: Parikshit Thakur

Constructor Summary
TargetMirror(java.net.URI tdURI, java.lang.String targetId, IClientTun tun)
          Creates a new Target instance.
 
Method Summary
 java.lang.String getDomain()
          getDomain returns a targetDirectory's 'about' tag
 IResource getLabel(UserPreferences prefs)
          getLabel gives the best possible label for the target (based on region, etc...)
 java.util.List<TargetLocator> getLocators()
          getLocators returns the locators associated with this target.
 java.lang.String getName()
          getName returns the target's about tag.
 ResourceManager getResourceManager()
          getResourceManager returns a reference to the current ResourceManager
 int getResourceManagerInstance()
          getResourceManagerInstance returns the instance number of the ResourceManager
 java.util.List<ClientSession> getSessions()
          getSessions returns all open Sessions on the Target
 java.util.List<UISocketMirror> getSockets()
          getSockets returns all UISockets associated with the Target.
 TargetDirectory getTargetDirectory()
          getTargetDirectory returns the TargetDirectory associated with this Target
 java.lang.String getTargetId()
          Returns this Target's unique ID as given by its Tun.
 IClientTun getTUN()
          getTUN returns the Tun with which this Target is associated
 UISocketMirror getUiSocketMirrorBySocketId(java.lang.String socketId)
          Utility Method
 boolean isHidden()
          isHidden returns whether this is a hidden Target
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetMirror

public TargetMirror(java.net.URI tdURI,
                    java.lang.String targetId,
                    IClientTun tun)
             throws UrcException
Creates a new Target instance.

Parameters:
tdURI - an URI value
targetId - a String value
tun - an IClientTun value
Throws:
UrcException - if an error occurs
Method Detail

getDomain

public java.lang.String getDomain()
getDomain returns a targetDirectory's 'about' tag

Returns:
a String value

getTargetDirectory

public TargetDirectory getTargetDirectory()
getTargetDirectory returns the TargetDirectory associated with this Target

Returns:
a TargetDirectory value

getLabel

public IResource getLabel(UserPreferences prefs)
getLabel gives the best possible label for the target (based on region, etc...)

Parameters:
prefs -
Returns:
an IResource value

getLocators

public java.util.List<TargetLocator> getLocators()
getLocators returns the locators associated with this target.

Returns:
a List of locators

getName

public java.lang.String getName()
getName returns the target's about tag.

Returns:
a String value

getResourceManager

public ResourceManager getResourceManager()
getResourceManager returns a reference to the current ResourceManager

Returns:
the current ResourceManager

getResourceManagerInstance

public int getResourceManagerInstance()
getResourceManagerInstance returns the instance number of the ResourceManager

Returns:
the instance number of the ResourceManager

getSessions

public java.util.List<ClientSession> getSessions()
getSessions returns all open Sessions on the Target

Returns:
a List of all open ClientSessions on the Target

getSockets

public java.util.List<UISocketMirror> getSockets()
                                          throws UrcException
getSockets returns all UISockets associated with the Target.

Returns:
a List of UISocketMirror
Throws:
UrcException

getTargetId

public java.lang.String getTargetId()
Returns this Target's unique ID as given by its Tun.

Returns:
a String value

getTUN

public IClientTun getTUN()
getTUN returns the Tun with which this Target is associated

Returns:
an IClientTun value

isHidden

public boolean isHidden()
isHidden returns whether this is a hidden Target

Returns:
a boolean value

getUiSocketMirrorBySocketId

public UISocketMirror getUiSocketMirrorBySocketId(java.lang.String socketId)
Utility Method

Parameters:
socketId -
Returns:
UISocketMirror


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