cern.cmw.rda.client.group
Interface GroupUpdateHandler

All Known Implementing Classes:
GroupUpdateAdapter

public interface GroupUpdateHandler

Interface for callbacks as result of a group subscription. Each callback has the device name as the first parameter, which allows to find out for which device of the group the callback applies.

Author:
kostro
See Also:
DeviceGroup

Method Summary
 void confirmed(String deviceName)
          Invoked when the subscription request is confirmed by the data provider.
 void disconnected(String deviceName)
          Invoked when a confirmed subscription is suspended because of a lost connection to the data source.
 void handleError(String deviceName, IOError err)
          Invoked if an error occured when updating the value.
 void handleValue(String deviceName, Data value)
          Invoked when the subscribed value is updated.
 void reconnected(String deviceName)
          Invoked when a suspended subscription is resumed.
 void rejected(String deviceName, CmwException why)
          Invoked when the subscription request is rejected.
 

Method Detail

handleValue

void handleValue(String deviceName,
                 Data value)
Invoked when the subscribed value is updated. The value Data may change after the call returns: make a copy of the Data object if you need to store it in your application.

Parameters:
value - the Data object containing the updated value.

handleError

void handleError(String deviceName,
                 IOError err)
Invoked if an error occured when updating the value. This would typically be a data acquisition, timing, or I/O error in the device server.

Parameters:
err - the error description provided by the device server.

rejected

void rejected(String deviceName,
              CmwException why)
Invoked when the subscription request is rejected. A rejected request will be implicitely cancelled on return from this call (no need to #cancel it explicitely), and this object will be deleted (garbage collected) if it is unreferenced in the user code.

Parameters:
why - the exception thrown in response to the subscription request.

confirmed

void confirmed(String deviceName)
Invoked when the subscription request is confirmed by the data provider. This happens when the connection has been established for the first time and after a subsequent cancel/start. reconnected() will be invoked as well.

See Also:
reconnected(java.lang.String)

disconnected

void disconnected(String deviceName)
Invoked when a confirmed subscription is suspended because of a lost connection to the data source. This would typically happen when the device server crashes or shuts down. Note that this is not a fatal error: connection will be automatically reestablished when the server is up again. Also invoked initially when connection is not yet established or when an established connection has been cancelled. Note that in case when the subscription object has been created with automatic start, this method may be invoked when the object has not been yet fully constructed.

See Also:
reconnected(java.lang.String)

reconnected

void reconnected(String deviceName)
Invoked when a suspended subscription is resumed. Also invoked when connection to the data source has been established for the first time or after start has succeded.

See Also:
disconnected(java.lang.String)


Copyright © 2007 CERN. All Rights Reserved.