xmlBlaster 2.2.0 client API

org.xmlBlaster.client.feeder
Class PublishFile

java.lang.Object
  extended by org.xmlBlaster.client.feeder.PublishFile

public class PublishFile
extends java.lang.Object

Publish files to xmlBlaster.
Use this as a command line tool to publish files, images, etc. as messages to xmlBlaster. Invoke examples:

    java org.xmlBlaster.client.feeder.PublishFile -c <content-file> -k <key-file> -q <qos-file> -m <mime-type>
 
For other supported options type
    java org.xmlBlaster.client.feeder.PublishFile -?
 


Constructor Summary
PublishFile(java.lang.String[] args)
          Constructs the PublishFile object.
PublishFile(java.lang.String loginName, java.lang.String passwd, java.lang.String xmlKey, byte[] content, java.lang.String xmlQos)
          Open the connection, publish the message, close the connection.
 
Method Summary
protected  void feed(java.lang.String xmlKey, byte[] content, java.lang.String xmlQos)
          open the connection, publish the message, close the connection
static void main(java.lang.String[] args)
          Invoke: java org.xmlBlaster.client.feeder.PublishFile -c -k -q -m
 void publish(java.lang.String xmlKey, byte[] content, java.lang.String qos)
          Construct a message and publish it.
protected  void setUp()
          Sets up the fixture.
protected  void tearDown()
          Logout from xmlBlaster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublishFile

public PublishFile(java.lang.String[] args)
            throws XmlBlasterException
Constructs the PublishFile object.

Tries to support you in guessing the missing command line parameters.

Start with parameter -? to get a usage description.
These command line parameters are not merged with xmlBlaster.property properties.

By default the classes in the java.io package always resolve relative pathnames against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked

Parameters:
args - Command line arguments
Throws:
XmlBlasterException

PublishFile

public PublishFile(java.lang.String loginName,
                   java.lang.String passwd,
                   java.lang.String xmlKey,
                   byte[] content,
                   java.lang.String xmlQos)
Open the connection, publish the message, close the connection.

Method Detail

feed

protected void feed(java.lang.String xmlKey,
                    byte[] content,
                    java.lang.String xmlQos)
open the connection, publish the message, close the connection


setUp

protected void setUp()
Sets up the fixture.

Connect to xmlBlaster and login


tearDown

protected void tearDown()
Logout from xmlBlaster


publish

public void publish(java.lang.String xmlKey,
                    byte[] content,
                    java.lang.String qos)
Construct a message and publish it.


main

public static void main(java.lang.String[] args)
Invoke: java org.xmlBlaster.client.feeder.PublishFile -c -k -q -m


xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.