com.cisco.provisioning.cpe.events
Class DeviceEventQualifier

java.lang.Object
  extended by com.cisco.provisioning.cpe.events.Qualifier
      extended by com.cisco.provisioning.cpe.events.DeviceEventQualifier
All Implemented Interfaces:
Externalizable, Serializable

public class DeviceEventQualifier
extends Qualifier

This implementation of the Qualifier class is to be used with the DeviceEvent.

See Also:
Serialized Form

Constructor Summary
DeviceEventQualifier()
          This constructor is needed for externalization Note: This constructor is ONLY used for externalization.
 
Method Summary
 void clearAll()
          Clears all qualification options that have been set.
 String getDeviceID()
          Returns the device ID that is currently set for this qualifier.
 DeviceType getDeviceType()
          Returns the device type that is currently set for this qualifier.
 boolean qualifies(ProvAPIEvent event)
          Returns true if the implementation has determined that this event satisfies the requirements to notify the associated listener.
 void readExternal(ObjectInput in)
          Externalizable interface.
 void setChangedCOS()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.CHANGED_COS sub-events.
 void setChangedDHCPCriteria()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.CHANGED_DHCP_CRITERIA sub-events.
 void setDeletedDevice()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_DEVICE sub-events.
 void setDeletedDeviceId()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_DEVICE_ID sub-events.
 void setDeletedVoiceService()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_VOICE_SERVICE sub-events.
 void setDeviceID(String deviceID)
          Sets the qualifies method to return true to the DeviceEvents related to the device specified.
 void setDeviceType(DeviceType deviceType)
          Sets the qualifies method to return true to the DeviceEvents related to the device type specified.
 void setNewDevice()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_PROV_DEVICE and DeviceListener.NEW_UNPROV_DEVICE sub-events.
 void setNewProvDevice()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_PROV_DEVICE sub-events.
 void setNewUnprovDevice()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_UNPROV_DEVICE sub-events.
 void setNewVoiceService()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_VOICE_SERVICE sub-events.
 void setReceivedStatus()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.RECEIVED_STATUS sub-events.
 void setRoamingDevice()
          Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.ROAMING_DEVICE sub-events.
 void writeExternal(ObjectOutput out)
          Externalizable interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceEventQualifier

public DeviceEventQualifier()
This constructor is needed for externalization

Note: This constructor is ONLY used for externalization.

Method Detail

clearAll

public void clearAll()
Clears all qualification options that have been set.


qualifies

public boolean qualifies(ProvAPIEvent event)
Returns true if the implementation has determined that this event satisfies the requirements to notify the associated listener.

Specified by:
qualifies in class Qualifier
Parameters:
event - the object representing the event has occurred.

Returns:
true if the implementation has determined that this event satisfies the requirements to notify the associated listener.

setDeviceID

public void setDeviceID(String deviceID)
Sets the qualifies method to return true to the DeviceEvents related to the device specified.


getDeviceID

public String getDeviceID()
Returns the device ID that is currently set for this qualifier. This may return null if no device ID is set.

Returns:
the device ID that is currently set for this qualifier.

setDeviceType

public void setDeviceType(DeviceType deviceType)
Sets the qualifies method to return true to the DeviceEvents related to the device type specified.


getDeviceType

public DeviceType getDeviceType()
Returns the device type that is currently set for this qualifier. This may return null if no device type is set.

Returns:
the device type that is currently set for this qualifier.

setNewDevice

public void setNewDevice()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_PROV_DEVICE and DeviceListener.NEW_UNPROV_DEVICE sub-events. This corresponds to addition of new devices (both registered and unregistered).


setNewProvDevice

public void setNewProvDevice()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_PROV_DEVICE sub-events.


setNewUnprovDevice

public void setNewUnprovDevice()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_UNPROV_DEVICE sub-events.


setDeletedDevice

public void setDeletedDevice()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_DEVICE sub-events.


setRoamingDevice

public void setRoamingDevice()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.ROAMING_DEVICE sub-events.


setNewVoiceService

public void setNewVoiceService()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.NEW_VOICE_SERVICE sub-events.


setDeletedVoiceService

public void setDeletedVoiceService()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_VOICE_SERVICE sub-events.


setChangedCOS

public void setChangedCOS()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.CHANGED_COS sub-events.


setReceivedStatus

public void setReceivedStatus()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.RECEIVED_STATUS sub-events.


setChangedDHCPCriteria

public void setChangedDHCPCriteria()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.CHANGED_DHCP_CRITERIA sub-events.


setDeletedDeviceId

public void setDeletedDeviceId()
Sets the qualifies method to return true to all DeviceEvents that are DeviceListener.DELETED_DEVICE_ID sub-events.


readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Externalizable interface. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Qualifier
Parameters:
in - the stream to read data from in order to restore the object

Throws:
IOException - if I/O errors occur
ClassNotFoundException - If the class for an object being restored cannot be found.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Externalizable interface. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Qualifier
Parameters:
out - the stream to write the object to

Throws:
IOException - Includes any I/O exceptions that may occur