|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.client.protocol.corba.CorbaConnection
public final class CorbaConnection
This is a helper class, helping a Java client to connect to xmlBlaster using IIOP (CORBA).
Please note that you don't need to use this wrapper, you can use the raw CORBA interface as well. You can also hack your own little wrapper, which does exactly what you want.
This class converts the Corba based exception
org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException
to
org.xmlBlaster.util.XmlBlasterException
There is a constructor for applets, and standalone Java clients.
If you need a failsafe client, you can invoke the xmlBlaster CORBA methods through this class as well (for example use corbaConnection.publish() instead of the direct CORBA server.publish()). You should set jacorb.retries=0 in $HOME/.jacorb_properties if you use the failsafe mode If you want to connect from a servlet, please use the framework in xmlBlaster/src/java/org/xmlBlaster/protocol/http NOTE: JacORB 1.1 does not release the listener thread and the poa threads of the callback server on orb.shutdown().
Constructor Summary | |
---|---|
CorbaConnection()
Called by plugin loader which calls init(Global, PluginInfo) thereafter. |
|
CorbaConnection(Global glob,
java.applet.Applet ap)
CORBA client access to xmlBlaster for applets. |
Method Summary | |
---|---|
java.lang.String |
connect(java.lang.String connectQos)
Login to the server. |
void |
connectLowlevel(Address address)
Initialize the driver and verify if the remote side is reachable on the low-level protocol layer. |
boolean |
disconnect(java.lang.String qos)
Logout from the server. |
java.lang.String[] |
erase(java.lang.String xmlKey,
java.lang.String qos)
|
MsgUnitRaw[] |
get(java.lang.String xmlKey,
java.lang.String qos)
|
org.xmlBlaster.protocol.corba.authenticateIdl.AuthServer |
getAuthenticationService(Address address)
Access the authentication service. |
org.omg.CORBA.ORB |
getOrb()
Accessing the orb handle. |
java.lang.String |
getProtocol()
|
java.lang.String |
getType()
Enforced by I_Plugin |
java.lang.String |
getVersion()
Enforced by I_Plugin |
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin). |
boolean |
isLoggedIn()
|
java.lang.String |
ping(java.lang.String qos)
Ping the server on physical level and/or application level (see AvailabilityChecker). |
java.lang.String |
publish(MsgUnitRaw msgUnit)
Publish fault-tolerant the given message. |
java.lang.String[] |
publishArr(MsgUnitRaw[] msgUnitArr)
|
void |
publishOneway(MsgUnitRaw[] msgUnitArr)
|
I_ProgressListener |
registerProgressListener(I_ProgressListener listener)
Register a listener for to receive information about the progress of incoming data. |
void |
resetConnection()
Reset |
void |
setConnectReturnQos(ConnectReturnQos connectReturnQos)
Pass the driver the decrypted and parsed ConnectReturnQos directly after a connect. |
void |
shutdown()
Shut down the callback server. |
java.lang.String |
subscribe(java.lang.String xmlKey,
java.lang.String qos)
Enforced by I_XmlBlasterConnection interface (failsafe mode). |
java.lang.String[] |
unSubscribe(java.lang.String xmlKey,
java.lang.String qos)
Enforced by I_XmlBlasterConnection interface (failsafe mode) |
static java.lang.String |
usage()
Command line usage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CorbaConnection()
public CorbaConnection(Global glob, java.applet.Applet ap)
<APPLET CODEBASE = "http://localhost" CODE = "DemoApplet.class" NAME = "xmlBlaster demo" WIDTH = 200 HEIGHT = 200 HSPACE = 0 VSPACE = 0 ALIGN = middle > <PARAM name=org.omg.CORBA.ORBClass value=org.jacorb.orb.ORB> <PARAM name=org.omg.CORBA.ORBSingletonClass value=org.jacorb.orb.ORBSingleton> <PARAM name=SVCnameroot value=xmlBlaster-Authenticate> </APPLET>
ap
- Applet handleMethod Detail |
---|
public java.lang.String getType()
getType
in interface I_Plugin
public java.lang.String getVersion()
getVersion
in interface I_Plugin
public void init(Global glob, PluginInfo pluginInfo)
init
in interface I_Plugin
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public void resetConnection()
resetConnection
in interface I_XmlBlasterConnection
public final java.lang.String getProtocol()
getProtocol
in interface I_XmlBlasterConnection
public org.omg.CORBA.ORB getOrb()
public org.xmlBlaster.protocol.corba.authenticateIdl.AuthServer getAuthenticationService(Address address) throws XmlBlasterException
-dispatch/callback/plugin/ior/iorString "IOR:0000..."
-dispatch/connection/plugin/ior/iorFile yourIorFile
-bootstrapHostname server.xmlBlaster.org -bootstrapPort 3412
XmlBlasterException
- id="NoAuthService"public java.lang.String connect(java.lang.String connectQos) throws XmlBlasterException
connect
in interface I_XmlBlasterConnection
connectQos
- The encrypted connect QoS
XmlBlasterException
- if login failspublic void connectLowlevel(Address address) throws XmlBlasterException
I_XmlBlasterConnection
connectLowlevel
in interface I_XmlBlasterConnection
address
- Contains the remote address,
e.g. the host and port where the remote server listens
XmlBlasterException
- ErrorCode.COMMUNICATION* if the server is not reachable,
in this case we can poll for the server.I_XmlBlasterConnection.connectLowlevel(Address)
public void setConnectReturnQos(ConnectReturnQos connectReturnQos) throws XmlBlasterException
I_XmlBlasterConnection
setConnectReturnQos
in interface I_XmlBlasterConnection
XmlBlasterException
I_XmlBlasterConnection.setConnectReturnQos(ConnectReturnQos)
public boolean disconnect(java.lang.String qos)
disconnect
in interface I_XmlBlasterConnection
qos
- The QoS or null
public void shutdown() throws XmlBlasterException
shutdown
in interface I_XmlBlasterConnection
shutdown
in interface I_Plugin
XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.public boolean isLoggedIn()
isLoggedIn
in interface I_XmlBlasterConnection
public final java.lang.String subscribe(java.lang.String xmlKey, java.lang.String qos) throws XmlBlasterException
subscribe
in interface I_XmlBlasterConnection
XmlBlasterException
public final java.lang.String[] unSubscribe(java.lang.String xmlKey, java.lang.String qos) throws XmlBlasterException
unSubscribe
in interface I_XmlBlasterConnection
XmlBlasterException
public final java.lang.String publish(MsgUnitRaw msgUnit) throws XmlBlasterException
publish
in interface I_XmlBlasterConnection
XmlBlasterException
public java.lang.String[] publishArr(MsgUnitRaw[] msgUnitArr) throws XmlBlasterException
publishArr
in interface I_XmlBlasterConnection
XmlBlasterException
public void publishOneway(MsgUnitRaw[] msgUnitArr) throws XmlBlasterException
publishOneway
in interface I_XmlBlasterConnection
XmlBlasterException
public final java.lang.String[] erase(java.lang.String xmlKey, java.lang.String qos) throws XmlBlasterException
erase
in interface I_XmlBlasterConnection
XmlBlasterException
public final MsgUnitRaw[] get(java.lang.String xmlKey, java.lang.String qos) throws XmlBlasterException
get
in interface I_XmlBlasterConnection
XmlBlasterException
public I_ProgressListener registerProgressListener(I_ProgressListener listener)
registerProgressListener
in interface I_XmlBlasterConnection
listener
- Your listener, pass 0 to unregister.
public java.lang.String ping(java.lang.String qos) throws XmlBlasterException
I_XmlBlasterConnection
ping
in interface I_XmlBlasterConnection
XmlBlasterException
I_XmlBlasterConnection.ping(String)
public static java.lang.String usage()
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |