1.0.0

org.eclipse.soda.dk.profile.service
Interface ProfileListener

All Superinterfaces:
ErrorListener

public interface ProfileListener
extends ErrorListener

The ProfileListener interface defines the methods to be called when event notification occurs. The ProfileListener interface should be implemented by any class which wishes to be notified of changes in the configuration of a ProfileService. This includes the addition of Contols, the removal of Controls, and The modification of Controls.

Version:
1.0.0
See Also:
CommandService, CommandListener, ControlService, DeviceService, ErrorListener, MeasurementService, MeasurementListener, SignalService, SignalListener

Field Summary
static int ADDED
          Define the added (int) constant.
static int CHANGED
          Define the changed (int) constant.
static int REMOVED
          Define the removed (int) constant.
 
Method Summary
 void controlChanged(ProfileService device, java.lang.Object timestamp, ControlService control, int code)
          The controlChanged method is called when a control was changed.
 void deviceChanged(ProfileService source, java.lang.Object timestamp, int newState, int oldState)
          This method will be called when the state of the ProfileService changes.
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.ErrorListener
errorOccurred
 

Field Detail

ADDED

static final int ADDED
Define the added (int) constant.

See Also:
Constant Field Values

REMOVED

static final int REMOVED
Define the removed (int) constant.

See Also:
Constant Field Values

CHANGED

static final int CHANGED
Define the changed (int) constant.

See Also:
Constant Field Values
Method Detail

controlChanged

void controlChanged(ProfileService device,
                    java.lang.Object timestamp,
                    ControlService control,
                    int code)
The controlChanged method is called when a control was changed. A notification method to all ProfileListeners that a ControlService, specified by the control argument, and contained within the ProfileService, specified in the device arguement, was Added, Removed, or Modified, specified by the code argument in accordance with the above constants, at the time specified by the timestamp argument. In English : A control of the ProfileService was changed in the following manner at this time. Since other notifications are blocked until this method returns, implementors of this method should:

Parameters:
device - org.eclipse.soda.dk.device.service.ProfileService
timestamp - java.lang.Object
control - org.eclipse.soda.dk.device.service.ControlService
code - int
See Also:
deviceChanged(ProfileService,Object,int,int)

deviceChanged

void deviceChanged(ProfileService source,
                   java.lang.Object timestamp,
                   int newState,
                   int oldState)
This method will be called when the state of the ProfileService changes. Since other notifications are blocked until this method returns, implementors of this method should: Because of the multiple threads and quickly changing states, the current state of the device may not be the same as the newState input parameter.

Parameters:
source - org.eclipse.soda.dk.device.service.ProfileService
timestamp - java.lang.Object
newState - The new state of the ProfileService when the notification process started.
oldState - The old state of the ProfileService.
See Also:
controlChanged(ProfileService,Object,ControlService,int)

1.0.0

Copyright (c) 1999, 2007 IBM