javax.activation
Class CommandMap

java.lang.Object
  extended by javax.activation.CommandMap
Direct Known Subclasses:
MailcapCommandMap

public abstract class CommandMap
extends java.lang.Object

Registry of command objects available to the system.


Constructor Summary
CommandMap()
           
 
Method Summary
abstract  DataContentHandler createDataContentHandler(java.lang.String mimeType)
          Returns a DataContentHandler corresponding to the MIME type.
abstract  CommandInfo[] getAllCommands(java.lang.String mimeType)
          Returns the complete list of commands for a MIME type.
abstract  CommandInfo getCommand(java.lang.String mimeType, java.lang.String cmdName)
          Returns the command corresponding to the specified MIME type and command name.
static CommandMap getDefaultCommandMap()
          Returns the default command map.
abstract  CommandInfo[] getPreferredCommands(java.lang.String mimeType)
          Returns the list of preferred commands for a MIME type.
static void setDefaultCommandMap(CommandMap commandMap)
          Sets the default command map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandMap

public CommandMap()
Method Detail

getDefaultCommandMap

public static CommandMap getDefaultCommandMap()
Returns the default command map. This returns a MailcapCommandMap if no value has been set using setDefaultCommandMap.


setDefaultCommandMap

public static void setDefaultCommandMap(CommandMap commandMap)
Sets the default command map.

Parameters:
commandMap - the new default command map

getPreferredCommands

public abstract CommandInfo[] getPreferredCommands(java.lang.String mimeType)
Returns the list of preferred commands for a MIME type.

Parameters:
mimeType - the MIME type

getAllCommands

public abstract CommandInfo[] getAllCommands(java.lang.String mimeType)
Returns the complete list of commands for a MIME type.

Parameters:
mimeType - the MIME type

getCommand

public abstract CommandInfo getCommand(java.lang.String mimeType,
                                       java.lang.String cmdName)
Returns the command corresponding to the specified MIME type and command name.

Parameters:
mimeType - the MIME type
cmdName - the command name

createDataContentHandler

public abstract DataContentHandler createDataContentHandler(java.lang.String mimeType)
Returns a DataContentHandler corresponding to the MIME type.

Parameters:
mimeType - the MIME type