xmlBlaster 2.1.0 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 -?
 


Field Summary
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String loginName
           
private static java.lang.String ME
           
private  java.lang.String passwd
           
private  I_XmlBlasterAccess senderConnection
           
 
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
private  void usage()
          Command line usage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private static final java.lang.String ME
See Also:
Constant Field Values

senderConnection

private I_XmlBlasterAccess senderConnection

glob

private Global glob

log

private static java.util.logging.Logger log

loginName

private java.lang.String loginName

passwd

private java.lang.String passwd
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.


usage

private void usage()
Command line usage.


main

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


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.