xmlBlaster 2.2.0 client 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

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.
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
 

Method Detail

instance

public static MsgInfoParserFactory instance()

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.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.