|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.client.protocol.rmi.RmiConnection
This is a helper class, helping a Java client to connect to xmlBlaster using RMI.
Please note that you don't need to use this wrapper, you can use the raw RMI interface as well. You can also hack your own little wrapper, which does exactly what you want.
There is a constructor for applets, and standalone Java clients.
If you need a failsafe client, you can invoke the xmlBlaster RMI methods through this class as well (for example use rmiConnection.publish() instead of the direct RMI server.publish()). If you want to connect from a servlet, please use the framework in xmlBlaster/src/java/org/xmlBlaster/protocol/http# Configure RMI plugin to load: ClientProtocolPlugin[RMI][1.0]=org.xmlBlaster.client.protocol.rmi.RmiConnection
| Field Summary | |
protected Address |
clientAddress
|
static int |
DEFAULT_REGISTRY_PORT
XmlBlaster RMI registry listen port is 1099, to access for bootstrapping |
| Constructor Summary | |
RmiConnection()
Called by plugin loader which calls init(Global, PluginInfo) thereafter. |
|
RmiConnection(Global glob)
RMI client access to xmlBlaster for normal client applications. |
|
RmiConnection(Global glob,
java.applet.Applet ap)
RMI client access to xmlBlaster for applets. |
|
| Method Summary | |
java.lang.String |
connect(java.lang.String connectQos)
Login to the server. |
void |
connectLowlevel(Address address)
Connect to RMI server. |
boolean |
disconnect(java.lang.String disconnectQos)
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)
|
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 str)
Check server. |
java.lang.String |
publish(MsgUnitRaw msgUnit)
Publish fault-tolerant the given message. |
java.lang.String[] |
publishArr(MsgUnitRaw[] msgUnitArr)
|
void |
publishOneway(MsgUnitRaw[] msgUnitArr)
RMI does not support oneway messages. |
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. |
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 |
| Field Detail |
protected Address clientAddress
public static final int DEFAULT_REGISTRY_PORT
| Constructor Detail |
public RmiConnection()
public RmiConnection(Global glob)
throws XmlBlasterException
public RmiConnection(Global glob,
java.applet.Applet ap)
throws XmlBlasterException
ap - Applet handle| Method Detail |
public java.lang.String getType()
getType in interface I_Pluginpublic java.lang.String getVersion()
getVersion in interface I_Plugin
public void init(Global glob,
PluginInfo pluginInfo)
throws XmlBlasterException
init in interface I_PluginXmlBlasterExceptionI_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public void connectLowlevel(Address address)
throws XmlBlasterException
connectLowlevel in interface I_XmlBlasterConnectionaddress - 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.public void resetConnection()
resetConnection in interface I_XmlBlasterConnectionpublic final java.lang.String getProtocol()
getProtocol in interface I_XmlBlasterConnection
public java.lang.String connect(java.lang.String connectQos)
throws XmlBlasterException
connect in interface I_XmlBlasterConnectionconnectQos - The encrypted connect QoS
XmlBlasterException - if login failspublic void setConnectReturnQos(ConnectReturnQos connectReturnQos)
I_XmlBlasterConnection
setConnectReturnQos in interface I_XmlBlasterConnectionI_XmlBlasterConnection.setConnectReturnQos(ConnectReturnQos)public boolean disconnect(java.lang.String disconnectQos)
disconnect in interface I_XmlBlasterConnectiondisconnectQos - The QoS or null
public void shutdown()
throws XmlBlasterException
shutdown in interface I_XmlBlasterConnectionXmlBlasterExceptionpublic 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_XmlBlasterConnectionXmlBlasterException
public final java.lang.String[] unSubscribe(java.lang.String xmlKey,
java.lang.String qos)
throws XmlBlasterException
unSubscribe in interface I_XmlBlasterConnectionXmlBlasterException
public final java.lang.String publish(MsgUnitRaw msgUnit)
throws XmlBlasterException
publish in interface I_XmlBlasterConnectionXmlBlasterException
public java.lang.String[] publishArr(MsgUnitRaw[] msgUnitArr)
throws XmlBlasterException
publishArr in interface I_XmlBlasterConnectionXmlBlasterException
public void publishOneway(MsgUnitRaw[] msgUnitArr)
throws XmlBlasterException
publishOneway in interface I_XmlBlasterConnectionXmlBlasterException
public final java.lang.String[] erase(java.lang.String xmlKey,
java.lang.String qos)
throws XmlBlasterException
erase in interface I_XmlBlasterConnectionXmlBlasterException
public final MsgUnitRaw[] get(java.lang.String xmlKey,
java.lang.String qos)
throws XmlBlasterException
get in interface I_XmlBlasterConnectionXmlBlasterExceptionpublic I_ProgressListener registerProgressListener(I_ProgressListener listener)
registerProgressListener in interface I_XmlBlasterConnectionlistener - Your listener, pass 0 to unregister.
public java.lang.String ping(java.lang.String str)
throws XmlBlasterException
ping in interface I_XmlBlasterConnectionXmlBlasterExceptionpublic static java.lang.String usage()
|
xmlBlaster 1.6.2 client API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||