Menu

EntryHandlers

doe300

The different types and sources of Entries are handled via PathHandler and ContentHandler:

PathHandler:
A PathHandler handles the "path" (source) of the Entry. It provides methods to access the original resource behind the entry (i.e. load it, get the name, etc.)
Predefined PathHandlers:

  • ResourceHandler: handles entries, which are based on actual files (local or remote)
    • FileHandler: handles local files
    • URLHandler: handles remote URLs
  • MetaHandler: handles entries, which are collected information about something/anything
    • JMDBHandler: handles meta-data of Movies, Actors, etc. using the internalt jmdb-API

ContentHandler:
A ContentHandler handles the "content" (type) of the Entry. It provides methods to access the entriy's content independent on which PathHandler the Entry has. There are various kinds of ContentHandlers for the various kinds of Entries (i.e. ImageHandler for image-based entries)
Predefined ContentHandlers:

  • AudioHandler: handles audio-entries
    • MIDIAudioHandler: handles MIDI-audio
    • SampledAudioHandler: handles sampled audio using the javax.sound-API
  • ImageHandler: handles image-based entries
  • ContainerHandler: handles archive-based entries
  • GroupHandler: handles entries, which are actually a group of entries
    • DirectoryHandler: handles entry-groups based on directories
    • CustomGroupHandler: handles custom entry-groups

Both handlers provide only basic methods and are extensible to the implementers needs. The predefined handlers are only a selection and more and more are added during development.

Neither the programmer of extensions or handlers nor the user need to worry about the entry's handlers. The most fittings handlers are determined at creation of the entry and Entry provides convenient method to determine and access the correct kind of handler.

Project Admins:


MongoDB Logo MongoDB