edu.UCL.satin.impl.remotecomponents
Class RemoteComponent

java.lang.Object
  extended byedu.UCL.satin.arch.components.Component
      extended byedu.UCL.satin.impl.remotecomponents.RemoteComponent
All Implemented Interfaces:
ComponentFacet, Facet, HasLocation

public class RemoteComponent
extends Component
implements HasLocation

This class represents a component (along with it's known attributes) that exists remotelly.

Author:
Stefanos Zachariadis

Field Summary
private  DebugFacet debug
           
private  Location location
           
private  java.lang.Object message
          Returns contact details for the component.
 
Fields inherited from class edu.UCL.satin.arch.components.Component
immutable, properties
 
Fields inherited from interface edu.UCL.satin.arch.facets.ComponentFacet
DISABLED, ENABLED
 
Constructor Summary
RemoteComponent(java.lang.Object id, java.util.Hashtable properties, java.lang.Object message, Location location)
          Creates a new remote component (which is obviously immutable to the local host)
RemoteComponent(java.lang.String msg, java.lang.String advMsg, Location location)
          Creates a new remote component based on its textual representation of its attributes
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Location getLocation()
           
 java.lang.Object getMessage()
           
 boolean isEnabled()
          Returns whether this component is enabled/active or not.
static java.util.Hashtable parseRemoteProperties(java.lang.String msg)
          parses the properties of a component (as text) into a hashtable
 void setEnabled(boolean enabled)
          Activates or deactivates this component (if applicable).
 
Methods inherited from class edu.UCL.satin.arch.components.Component
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute, match, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

message

private java.lang.Object message
Returns contact details for the component. The way these are formulated are up to the implementor.


debug

private DebugFacet debug

location

private Location location
Constructor Detail

RemoteComponent

public RemoteComponent(java.lang.Object id,
                       java.util.Hashtable properties,
                       java.lang.Object message,
                       Location location)
Creates a new remote component (which is obviously immutable to the local host)

Parameters:
id - the component's identifier
properties - the component's attributes
message - the advertising message for the component

RemoteComponent

public RemoteComponent(java.lang.String msg,
                       java.lang.String advMsg,
                       Location location)
Creates a new remote component based on its textual representation of its attributes

Parameters:
msg - the tetual representation of the components properties
advMsg - the advertising message for the component
Method Detail

getMessage

public java.lang.Object getMessage()

isEnabled

public boolean isEnabled()
Description copied from class: Component
Returns whether this component is enabled/active or not. Note that unless overloaded, the component is assumed to always be enabled

Specified by:
isEnabled in interface ComponentFacet
Overrides:
isEnabled in class Component
Returns:

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: Component
Activates or deactivates this component (if applicable). Note that unless overloaded, the component is assumed to always be enabled.

Specified by:
setEnabled in interface ComponentFacet
Overrides:
setEnabled in class Component
Parameters:
enabled -

parseRemoteProperties

public static java.util.Hashtable parseRemoteProperties(java.lang.String msg)
parses the properties of a component (as text) into a hashtable

Returns:
A Hashtable of attributes, based on the text

equals

public boolean equals(java.lang.Object o)

getLocation

public Location getLocation()
Specified by:
getLocation in interface HasLocation