es.iac.ing.codeso.status.client
Class StatusItemProxyGeneric

java.lang.Object
  extended by es.iac.ing.codeso.status.client.StatusItemProxy
      extended by es.iac.ing.codeso.status.client.StatusItemProxyGeneric

@ThreadSafe
public class StatusItemProxyGeneric
extends StatusItemProxy

A proxy designed to connect to a remote status item of any CODESO type.

This class is thread-safe.


Nested Class Summary
static class StatusItemProxyGeneric.NotConnectedException
          A checked exception which is thrown if an attempt is made to extract value or descriptor information from the parent class when it was in the not-connected state.
 
Field Summary
 
Fields inherited from class es.iac.ing.codeso.status.client.StatusItemProxy
publisherProxy
 
Constructor Summary
StatusItemProxyGeneric(CorbaName corbaName)
          Constructs an instance with the default connection policy.
StatusItemProxyGeneric(CorbaName corbaName, StatusItemProxyConnectionPolicy statusItemProxyConnectionPolicy)
          Constructs an instance with the specified connection policy.
 
Method Summary
 StatusItemDescriptor getDescriptor()
          Returns the status item proxy's descriptor information, if available, or throws an exception if otherwise.
 StatusItemDescriptor getUncheckedDescriptor()
          Returns this proxy's descriptor information, if available, or null if otherwise.
 StatusItemValue getUncheckedValue()
          Returns this proxy's value information, if available, or null if otherwise.
 StatusItemValue getValue()
          Returns the status item proxy's value information, if available, or throws an exception if otherwise.
 
Methods inherited from class es.iac.ing.codeso.status.client.StatusItemProxy
activate, addListener, awaitConnection, awaitEvent, deleteListener, getCorbaName, getProxyInfo, getStatistics, isActive, isConnected, isShutdown, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatusItemProxyGeneric

public StatusItemProxyGeneric(CorbaName corbaName)
Constructs an instance with the default connection policy.

Once created the status item proxy will remain dormant until activated via the activate method.

Parameters:
corbaName - string specifying the name of the object to connect to as registered within the CORBA Naming Service. For example: "Codeso/USP/FilterFocusCorrectorRawPosition.StatusItem"
Throws:
java.lang.NullPointerException - if the corbaName parameter name was null.

StatusItemProxyGeneric

public StatusItemProxyGeneric(CorbaName corbaName,
                              StatusItemProxyConnectionPolicy statusItemProxyConnectionPolicy)
Constructs an instance with the specified connection policy.

Once created the status item proxy will remain dormant until activated via the activate method.

Parameters:
corbaName - CorbaName specifying the name of the remote status item to connect to and the location of the CORBA Naming Service on which it is expected to be registered.
statusItemProxyConnectionPolicy - reference to an object that will define the policies to be used when connecting with this proxy's remote status item.
Throws:
java.lang.NullPointerException - if either of the reference parameters were null.
Method Detail

getUncheckedValue

public StatusItemValue getUncheckedValue()
Returns this proxy's value information, if available, or null if otherwise.

The value information will be available if the proxy was connected to its remote status item at the moment this method was invoked.

Returns:
the proxy's value information or null.

getValue

public StatusItemValue getValue()
                         throws StatusItemProxyGeneric.NotConnectedException
Returns the status item proxy's value information, if available, or throws an exception if otherwise.

The value information will be available if the proxy was connected to its remote status item at the moment this method was invoked. Under other circumstances this method will throw the checked NotConnectedException providing details of the cause of connection failure.

Returns:
the proxy's value information at the moment when this class instance was constructed.
Throws:
StatusItemProxyGeneric.NotConnectedException - if the proxy was not connected when this method was invoked.
See Also:
getUncheckedValue()

getUncheckedDescriptor

public StatusItemDescriptor getUncheckedDescriptor()
Returns this proxy's descriptor information, if available, or null if otherwise.

The descriptor information will be available if the proxy was connected to its remote status item at the moment this method was invoked.

Returns:
the proxy's descriptor information or null.

getDescriptor

public StatusItemDescriptor getDescriptor()
                                   throws StatusItemProxyGeneric.NotConnectedException
Returns the status item proxy's descriptor information, if available, or throws an exception if otherwise.

The descriptor information will be available if the proxy was connected to its remote status item at the moment this method was invoked. Under other circumstances this method will throw the checked NotConnectedException providing details of the cause of connection failure.

Returns:
the proxy's value information at the moment when this class instance was constructed.
Throws:
StatusItemProxyGeneric.NotConnectedException - if the proxy was not connected when this method was invoked.
See Also:
getUncheckedDescriptor()