org.ocap.hn
Class ContentServerEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.ocap.hn.ContentServerEvent
All Implemented Interfaces:
Serializable

public class ContentServerEvent
extends EventObject

Event which will be sent to registered ContentServerListeners when ContentEntrys have been added, changed or removed.

See Also:
Serialized Form

Field Summary
static int CONTENT_ADDED
          Event ID indicating that content got added to a ContentServerNetModule.
static int CONTENT_CHANGED
          Event ID indicating that metadata associated with content has been updated.
static int CONTENT_REMOVED
          Event ID indicating that content got removed from a ContentServerNetModule
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContentServerEvent(Object source, String[] content, int evt)
          Creates a new ContentServerEvent with the given source object, the ContentItem involved and an event ID indicating whether the content got added or removed.
 
Method Summary
 String[] getContent()
          Returns the IDs associated with the ContentEntrys involved in this event.
 ContentServerNetModule getContentServerNetModule()
          Returns the ContentServerNetModule.
 int getEventID()
          Gets the event ID for this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENT_ADDED

public static final int CONTENT_ADDED
Event ID indicating that content got added to a ContentServerNetModule. This event SHALL NOT guarantee that any content items or associated metadata have been communicated to the local device. Applications should utilize the content browsing and searching APIs to retrieve any added content items.

See Also:
ContentServerNetModule, Constant Field Values

CONTENT_REMOVED

public static final int CONTENT_REMOVED
Event ID indicating that content got removed from a ContentServerNetModule

See Also:
Constant Field Values

CONTENT_CHANGED

public static final int CONTENT_CHANGED
Event ID indicating that metadata associated with content has been updated. This event SHALL NOT guarantee that and changes to content items or associated metadata have been communicated to the local device. Applications should utilize the content browsing and searching APIs to retrieve any updated metadata.

See Also:
ContentServerNetModule, Constant Field Values
Constructor Detail

ContentServerEvent

public ContentServerEvent(Object source,
                          String[] content,
                          int evt)
Creates a new ContentServerEvent with the given source object, the ContentItem involved and an event ID indicating whether the content got added or removed.

Parameters:
source - The source of this event. This must be a ContentServerNetModule.
content - the IDs of the ContentEntrys involved.
evt - the Event ID, either CONTENT_ADDED,CONTENT_REMOVED or CONTENT_CHANGED.
Method Detail

getContent

public String[] getContent()
Returns the IDs associated with the ContentEntrys involved in this event.

Returns:
the string IDs of the entries involved.

getContentServerNetModule

public ContentServerNetModule getContentServerNetModule()
Returns the ContentServerNetModule. This is the source object of the event.

Returns:
the ContentServerNetModule containing the ContentItem that was added/removed/changed

getEventID

public int getEventID()
Gets the event ID for this event. Valid values are CONTENT_ADDED, CONTENT_CHANGED and CONTENT_REMOVED

Returns:
the ID for this event


Copyright © 2011. All Rights Reserved.