⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.activation

Class CommandMap

java.lang.Object
|
+--javax.activation.CommandMap

Known Direct Subclasses:
MailcapCommandMap


public abstract class CommandMap
extends java.lang.Object

Registry of command objects available to the system.
Author:

Method Summary

DataContentHandler

createDataContentHandler(String mimeType)

Returns a DataContentHandler corresponding to the MIME type.

CommandInfo[]

getAllCommands(String mimeType)

Returns the complete list of commands for a MIME type.

CommandInfo

getCommand(String mimeType, String cmdName)

Returns the command corresponding to the specified MIME type and command name.

static CommandMap

getDefaultCommandMap()

Returns the default command map.

CommandInfo[]

getPreferredCommands(String mimeType)

Returns the list of preferred commands for a MIME type.

static void

setDefaultCommandMap(CommandMap commandMap)

Sets the default command map.

Method Details

createDataContentHandler

public DataContentHandler createDataContentHandler(String mimeType)

Returns a DataContentHandler corresponding to the MIME type.

Parameters:
mimeType - the MIME type

getAllCommands

public CommandInfo[] getAllCommands(String mimeType)

Returns the complete list of commands for a MIME type.

Parameters:
mimeType - the MIME type

getCommand

public CommandInfo getCommand(String mimeType, String cmdName)

Returns the command corresponding to the specified MIME type and command name.

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

getDefaultCommandMap

public static CommandMap getDefaultCommandMap()

Returns the default command map. This returns a MailcapCommandMap if no value has been set using setDefaultCommandMap.


getPreferredCommands

public CommandInfo[] getPreferredCommands(String mimeType)

Returns the list of preferred commands for a MIME type.

Parameters:
mimeType - the MIME type

setDefaultCommandMap

public static void setDefaultCommandMap(CommandMap commandMap)

Sets the default command map.

Parameters:
commandMap - the new default command map