VisiBroker for Java

com.inprise.vbroker.ServerManager
Interface ContainerOperations

All Known Subinterfaces:
Container
All Known Implementing Classes:
com.inprise.vbroker.ServerManager.ContainerImpl, com.inprise.vbroker.ServerManager.ContainerPOA, TPBOA, TSBOA

public interface ContainerOperations

Represents a ServerManager Container.


Method Summary
 void add_container(NamedContainer container)
          Adds a container specified into this container.
 void add_property(Property prop)
          Adds a property into the container.
 Any do_operation(Operation op)
          Executes an operation specified in "op".
 NamedContainer[] get_all_containers()
          Returns the sequence of all named containers contained in this container.
 Operation[] get_all_operations()
          Returns all the operations defined for this container.
 Property[] get_all_properties()
          Returns all the properties known to the container.
 Property[] get_changed_properties()
           
 NamedContainer get_container(java.lang.String name)
          Returns the named container contained in this container specified by the "name".
 Operation get_operation(java.lang.String name)
          Returns an operation specified by the name.
 Property get_property(java.lang.String name)
          Returns the property specified by the name.
 Storage get_storage()
          Returns the current storage that is set on the container.
 java.lang.String[] get_value_chain(java.lang.String propertyName)
          Returns all the values for a property overridden at different levels.
 java.lang.String[] list_all_containers()
          Returns the names of all Containers contained inside this container.
 java.lang.String[] list_all_operations()
          Returns the names of all operations defined for this container.
 java.lang.String[] list_all_properties()
          Returns the names of all the properties known to the container.
 void persist_properties(boolean recurse)
          Saves the properties contained in this container into the persistent storage.
 void restore_properties(boolean recurse)
          Restores the container properties from the storage, overwriting the existing values.
 void set_container(java.lang.String name, Container value)
          Sets (replaces) an already existing container.
 void set_properties(Property[] propSeq)
          Sets the value of existing properties.
 void set_property(java.lang.String name, Any value)
          Sets the value of an existing property.
 void set_storage(Storage s, boolean recurse)
          Sets the storage on the container.
 VersionInfo version()
          Returns the version info for this container.
 

Method Detail

get_changed_properties

Property[] get_changed_properties()

version

VersionInfo version()
Returns the version info for this container.


get_storage

Storage get_storage()
Returns the current storage that is set on the container.


set_storage

void set_storage(Storage s,
                 boolean recurse)
Sets the storage on the container.

Parameters:
s - Storage to be set.
recurse - If true then the storage also gets set on all the contained containers recursively.

set_container

void set_container(java.lang.String name,
                   Container value)
                   throws NameInvalid,
                          ValueInvalid,
                          ValueNotSettable
Sets (replaces) an already existing container.

Parameters:
name - Name of the container to be replaced.
value - The new container.
Throws:
NameInvalid - If no conatiner with the specified name exists.
ValueNotSettable - If the container could not be replace, for example, if the is_replaceable flag on the original container was false
ValueInvalid - If the named container value is invalid.

add_container

void add_container(NamedContainer container)
                   throws NameAlreadyPresent,
                          ValueInvalid
Adds a container specified into this container.

Parameters:
container - The NamedContainer to be added.
Throws:
NameAlreadyPresent - If a container with the specified name already exists.
ValueInvalid - If the named container value is invalid.

get_container

NamedContainer get_container(java.lang.String name)
                             throws NameInvalid
Returns the named container contained in this container specified by the "name".

Parameters:
name - Name of the container.
Returns:
the NamedContainer.
Throws:
NameInvalid - If no conatiner with the specified name exists.

get_all_containers

NamedContainer[] get_all_containers()
Returns the sequence of all named containers contained in this container.

Returns:
Array of NamedContainer.

list_all_containers

java.lang.String[] list_all_containers()
Returns the names of all Containers contained inside this container.

Returns:
String array containing names of all the containers.

do_operation

Any do_operation(Operation op)
                 throws NameInvalid,
                        ValueInvalid,
                        OperationFailed
Executes an operation specified in "op".

Parameters:
op - The operation to execute.
Returns:
result of the operation stored in a CORBA::Any
Throws:
NameInvalid - If the operation is not defined on the container.
OperationFailed - If the operation failed to execute, for example, some exception occurred.
ValueInvalid - If the value for any of the parameter is not of expected type.

get_operation

Operation get_operation(java.lang.String name)
                        throws NameInvalid
Returns an operation specified by the name.

Parameters:
name - Name of the operation.
Throws:
NameInvalid - If the operation is not defined on the container.

get_all_operations

Operation[] get_all_operations()
Returns all the operations defined for this container.

Returns:
Array of Operation containing info about the operations.

list_all_operations

java.lang.String[] list_all_operations()
Returns the names of all operations defined for this container.

Returns:
String array containing names of defined operations.

restore_properties

void restore_properties(boolean recurse)
                        throws StorageException
Restores the container properties from the storage, overwriting the existing values.

Parameters:
recurse - If true then call this method on all the containers contained in this container recursively.
Throws:
StorageException - if some error occurs while persisting the properties, like an I/O error.

persist_properties

void persist_properties(boolean recurse)
                        throws StorageException
Saves the properties contained in this container into the persistent storage.

Parameters:
recurse - If true then call this method on all the containers contained in this container recursively.
Throws:
StorageException - if some error occurs while persisting the properties, like an I/O error.

get_value_chain

java.lang.String[] get_value_chain(java.lang.String propertyName)
                                   throws NameInvalid
Returns all the values for a property overridden at different levels. For example, a property can be defined in a file and then overridden at command line. The method returns all values with the descending order precedence.

Parameters:
propertyName - Name of the property.
Returns:
Property values as an array of strings.
Throws:
NameInvalid - If the property name is invalid, e.g. property does not exist in the container.

set_properties

void set_properties(Property[] propSeq)
                    throws NameInvalid,
                           ValueInvalid,
                           ValueNotSettable
Sets the value of existing properties.

Parameters:
propSeq - Array containing Property structures for the properties to be set.

Note:

  • RWStatus value is ignored when setting the property.
  • While doing a bulk property setting, if setting a property throws an exception, the rest of the properties don't get set. For example, suppose the property array contains 3 properties. While setting property[1], an exception (say NameInvalid) got thrown. The end result is: property[0] got set, property[1] and property[2] don't get set.
Throws:
NameInvalid - If the property name is invalid, e.g. property does not exist in the container.
ValueInvalid - If the property value is not valid.
ValueNotSettable - If the property value cannot be set, for example, the property is read-only.

set_property

void set_property(java.lang.String name,
                  Any value)
                  throws NameInvalid,
                         ValueInvalid,
                         ValueNotSettable
Sets the value of an existing property.

Parameters:
name - Name of the property.
value - Value of the property stored inside a CORBA::Any
Throws:
NameInvalid - If the property name is invalid, e.g. property does not exist in the container.
ValueInvalid - If the property value is not valid.
ValueNotSettable - If the property value cannot be set, for example, the property is read-only.

add_property

void add_property(Property prop)
                  throws NameAlreadyPresent,
                         NameInvalid,
                         ValueInvalid
Adds a property into the container.

Parameters:
prop - Property to be added.
Throws:
NameAlreadyPresent - If a property by same name already exists.
NameInvalid - If the property name is Inavlid.
ValueInvalid - If the property value is not valid.

get_property

Property get_property(java.lang.String name)
                      throws NameInvalid
Returns the property specified by the name. If the property is not known to the container, a NameInvalid exception is thrown.

Parameters:
name - Name of the property.
Returns:
The Property structure cotaining the property information.
Throws:
NameInvalid

get_all_properties

Property[] get_all_properties()
Returns all the properties known to the container.

Returns:
Array of Property structure containing information about each property.

list_all_properties

java.lang.String[] list_all_properties()
Returns the names of all the properties known to the container.

Returns:
Array of String containing property names.

Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online