cern.cmw.rda.client.group
Class GroupUpdateAdapter

java.lang.Object
  extended by cern.cmw.rda.client.group.GroupUpdateAdapter
All Implemented Interfaces:
GroupUpdateHandler

public class GroupUpdateAdapter
extends Object
implements GroupUpdateHandler


Constructor Summary
GroupUpdateAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupUpdateAdapter

public GroupUpdateAdapter()
Method Detail

handleValue

public void handleValue(String deviceName,
                        Data value)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
handleValue in interface GroupUpdateHandler
value - the Data object containing the updated value.

handleError

public void handleError(String deviceName,
                        IOError err)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
handleError in interface GroupUpdateHandler
err - the error description provided by the device server.

rejected

public void rejected(String deviceName,
                     CmwException why)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
rejected in interface GroupUpdateHandler
why - the exception thrown in response to the subscription request.

confirmed

public void confirmed(String deviceName)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
confirmed in interface GroupUpdateHandler
See Also:
GroupUpdateHandler.reconnected(java.lang.String)

disconnected

public void disconnected(String deviceName)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
disconnected in interface GroupUpdateHandler
See Also:
GroupUpdateHandler.reconnected(java.lang.String)

reconnected

public void reconnected(String deviceName)
Description copied from interface: GroupUpdateHandler
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.

Specified by:
reconnected in interface GroupUpdateHandler
See Also:
GroupUpdateHandler.disconnected(java.lang.String)


Copyright © 2007 CERN. All Rights Reserved.