xmlBlaster 2.2.0 API

org.xmlBlaster.protocol
Interface I_XmlBlaster

All Known Implementing Classes:
XmlBlasterImpl

public interface I_XmlBlaster

This is the native interface to xmlBlaster.

All protocol drivers access xmlBlaster through these methods. This interface is implemented by engine/XmlBlasterImpl.java

Author:
xmlBlaster@marcelruff.info
See Also:
CORBA xmlBlaster.idl, RequestBroker

Method Summary
 java.lang.String[] erase(AddressServer addressServer, java.lang.String sessionId, java.lang.String xmlKey_literal, java.lang.String eraseQoS_literal)
          Delete messages.
 MsgUnitRaw[] get(AddressServer addressServer, java.lang.String sessionId, java.lang.String xmlKey_literal, java.lang.String getQoS_literal)
          Synchronous access a message.
 java.lang.String ping(AddressServer addressServer, java.lang.String qos)
          Ping to check if xmlBlaster is alive.
 java.lang.String publish(AddressServer addressServer, java.lang.String sessionId, MsgUnitRaw msgUnit)
          Publish a message.
 java.lang.String[] publishArr(AddressServer addressServer, java.lang.String sessionId, MsgUnitRaw[] msgUnitArr)
          Publish messages.
 void publishOneway(AddressServer addressServer, java.lang.String sessionId, MsgUnitRaw[] msgUnitArr)
          Publish messages.
 java.lang.String subscribe(AddressServer addressServer, java.lang.String sessionId, java.lang.String xmlKey_literal, java.lang.String subscribeQoS_literal)
          Subscribe to messages.
 java.lang.String toXml()
           
 java.lang.String toXml(java.lang.String extraOffset)
           
 java.lang.String[] unSubscribe(AddressServer addressServer, java.lang.String sessionId, java.lang.String xmlKey_literal, java.lang.String unSubscribeQos_literal)
          Unsubscribe from messages.
 

Method Detail

subscribe

java.lang.String subscribe(AddressServer addressServer,
                           java.lang.String sessionId,
                           java.lang.String xmlKey_literal,
                           java.lang.String subscribeQoS_literal)
                           throws XmlBlasterException
Subscribe to messages.

Parameters:
xmlKey_literal - Depending on the security plugin this key is encrypted
subscribeQoS_literal - Depending on the security plugin this qos is encrypted
isInternal - true if the subscription is internal, i.e. from a recovery
Throws:
XmlBlasterException
See Also:
RequestBroker, The interface.subscribe requirement

unSubscribe

java.lang.String[] unSubscribe(AddressServer addressServer,
                               java.lang.String sessionId,
                               java.lang.String xmlKey_literal,
                               java.lang.String unSubscribeQos_literal)
                               throws XmlBlasterException
Unsubscribe from messages.

To pass the raw xml ASCII strings, use this method.

Parameters:
xmlKey_literal - Depending on the security plugin this key is encrypted
unSubscribeQoS_literal - Depending on the security plugin this qos is encrypted
Throws:
XmlBlasterException
See Also:
RequestBroker

publish

java.lang.String publish(AddressServer addressServer,
                         java.lang.String sessionId,
                         MsgUnitRaw msgUnit)
                         throws XmlBlasterException
Publish a message.

Parameters:
msgUnit - The MsgUnitRaw contains the literal ASCII strings of xmlKey and publishQos and the binary content. Depending on the security plugin the msgUnit is encrypted
Throws:
XmlBlasterException
See Also:
RequestBroker, The interface.publish requirement

publishArr

java.lang.String[] publishArr(AddressServer addressServer,
                              java.lang.String sessionId,
                              MsgUnitRaw[] msgUnitArr)
                              throws XmlBlasterException
Publish messages.

This variant allows to pass an array of MsgUnitRaw object, for performance reasons and probably in future as an entity for transactions.

Throws:
XmlBlasterException
See Also:
RequestBroker, The interface.publish requirement

publishOneway

void publishOneway(AddressServer addressServer,
                   java.lang.String sessionId,
                   MsgUnitRaw[] msgUnitArr)
Publish messages.

The oneway variant may be used for better performance, it is not returning a value (no application level ACK) and there are no exceptions supported over the connection to the client.

See Also:
RequestBroker, The interface.publish requirement

erase

java.lang.String[] erase(AddressServer addressServer,
                         java.lang.String sessionId,
                         java.lang.String xmlKey_literal,
                         java.lang.String eraseQoS_literal)
                         throws XmlBlasterException
Delete messages.

Throws:
XmlBlasterException
See Also:
RequestBroker, The interface.erase requirement

get

MsgUnitRaw[] get(AddressServer addressServer,
                 java.lang.String sessionId,
                 java.lang.String xmlKey_literal,
                 java.lang.String getQoS_literal)
                 throws XmlBlasterException
Synchronous access a message.

Throws:
XmlBlasterException
See Also:
RequestBroker, The interface.get requirement

ping

java.lang.String ping(AddressServer addressServer,
                      java.lang.String qos)
                      throws XmlBlasterException
Ping to check if xmlBlaster is alive. This ping checks the availability on the application level.

Parameters:
qos - Currently an empty string ""
Returns:
qos, see StatusQosData.java
  <qos>
     <state id='OK'/>
  </qos>
 
Other returned id's are "RUNLEVEL_CLEANUP", "RUNLEVEL_STANDBY", "RUNLEVEL_HALTED". All none "OK" values tell that the server is not willing to process messages.
Throws:
XmlBlasterException

toXml

java.lang.String toXml()
                       throws XmlBlasterException
Throws:
XmlBlasterException

toXml

java.lang.String toXml(java.lang.String extraOffset)
                       throws XmlBlasterException
Throws:
XmlBlasterException

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.