xmlBlaster 2.1.0 API

org.xmlBlaster.util.xbformat
Class MsgInfoParserFactory

java.lang.Object
  extended by org.xmlBlaster.util.xbformat.MsgInfoParserFactory

public class MsgInfoParserFactory
extends java.lang.Object

Creates a parser instance to serialize xmlBlaster messages. For example the SOCKET xbf (xmlBlaster format) or the XmlScripting format.

Author:
xmlBlaster@marcelruff.info
See Also:
The protocol.socket requirement

Field Summary
private static MsgInfoParserFactory instance
           
private static java.util.logging.Logger log
           
private  java.util.Map pluginNames
           
 
Constructor Summary
private MsgInfoParserFactory()
           
 
Method Summary
 I_MsgInfoParser getMsgInfoParser(Global glob, I_ProgressListener progressListener, java.lang.String className, I_PluginConfig pluginConfig)
          Create a new parser instance.
 java.lang.String guessParserName(java.lang.String fileName, java.lang.String mimeType)
          Access the parser class name.
private  void init()
           
static MsgInfoParserFactory instance()
           
 boolean parserExists(java.lang.String fileName, java.lang.String mimeType)
          Check if the given mime can be parsed.
 void register(java.lang.String key, java.lang.String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log

instance

private static MsgInfoParserFactory instance

pluginNames

private java.util.Map pluginNames
Constructor Detail

MsgInfoParserFactory

private MsgInfoParserFactory()
Method Detail

instance

public static MsgInfoParserFactory instance()

init

private void init()

register

public void register(java.lang.String key,
                     java.lang.String className)

guessParserName

public java.lang.String guessParserName(java.lang.String fileName,
                                        java.lang.String mimeType)
Access the parser class name.

Parameters:
fileName - For example "xmlBlasterMessage.xbfz"
mimeType - For example "application/xmlBlaster-xbfz"
Returns:
For example "org.xmlBlaster.util.xbformat.XbfParser" or null if none found

parserExists

public boolean parserExists(java.lang.String fileName,
                            java.lang.String mimeType)
Check if the given mime can be parsed.

Parameters:
fileName - For example "xmlBlasterMessage.xbfz"
mimeType - For example "application/xmlBlaster-xbfz"
Returns:
true if we can parse this type

getMsgInfoParser

public I_MsgInfoParser getMsgInfoParser(Global glob,
                                        I_ProgressListener progressListener,
                                        java.lang.String className,
                                        I_PluginConfig pluginConfig)
                                 throws XmlBlasterException
Create a new parser instance. The init() method is called already

Parameters:
glob -
progressListener -
className - For example "org.xmlBlaster.util.xbformat.XbfParser" or "org.xmlBlaster.util.xbformat.XmlScriptParser" Can be null
pluginConfig - TODO
Returns:
Defaults to XbfParser()
Throws:
XmlBlasterException

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.