scs.auxiliar
Class ComponentPropertiesServant

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by scs.auxiliar.ComponentPropertiesPOA
          extended by scs.auxiliar.ComponentPropertiesServant
All Implemented Interfaces:
InvokeHandler, ComponentPropertiesOperations

public class ComponentPropertiesServant
extends ComponentPropertiesPOA

This class is an implementation of the ComponentProperties CORBA interface. The mentioned interface provides access to exported properties of a component.


Constructor Summary
ComponentPropertiesServant(ComponentContext myComponent)
          Primary constructor.
 
Method Summary
 Object _get_component()
          Provides a reference for the IComponent facet of this component.
 Property[] getProperties()
          Provides an array with all the component's properties.
 Property getProperty(String name)
          Given a property name, returns its value.
 void setProperty(Property prop)
          Given a property name, sets a new value.
 
Methods inherited from class scs.auxiliar.ComponentPropertiesPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentPropertiesServant

public ComponentPropertiesServant(ComponentContext myComponent)
Primary constructor. Initializes a map that associates property names with instances of the Property structure defined in IDL.

Parameters:
myComponent - Reference to the component instance that this implementation belongs to.
Method Detail

getProperties

public Property[] getProperties()
Provides an array with all the component's properties.

Returns:
A sequence with all properties.

getProperty

public Property getProperty(String name)
                     throws UndefinedProperty
Given a property name, returns its value.

Parameters:
name - The property name.
Returns:
The desired property.
Throws:
UndefinedProperty - If the property name does not exist.

setProperty

public void setProperty(Property prop)
                 throws ReadOnlyProperty
Given a property name, sets a new value. If the property doesn't exist, does nothing.

Parameters:
prop - The property with name and value to be set.
Throws:
ReadOnlyProperty - If the property cannot be changed.

_get_component

public Object _get_component()
Provides a reference for the IComponent facet of this component.



Copyright © 2014. All Rights Reserved.