|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.samples.detection.jndi.SimpleDetectorClient
public class SimpleDetectorClient
Simple remoting client that uses detection to discover the remoting server to make invocation on. Note that this class is a standard JMX NotificationListener so it can listen for discovery JMX notifications coming from the NetworkRegistry. This is how the NetworkRegistry tells us when new servers have come online and when dead servers go offline.
Constructor Summary | |
---|---|
SimpleDetectorClient()
|
Method Summary | |
---|---|
protected java.util.Map |
getConfiguration()
|
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
Callback method from the broadcaster MBean this listener implementation is registered to. |
static void |
main(java.lang.String[] args)
Starts the JBoss/Remoting client. |
void |
makeInvocation(java.lang.String locatorURI)
Make call on remoting server based on locator uri provided. |
static void |
println(java.lang.String msg)
Outputs a message to stdout. |
void |
setupDetector()
Sets up NetworkRegistry and JNDIDetector so we can listen for any additions or removals of remoting servers on the network. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleDetectorClient()
Method Detail |
---|
public void setupDetector() throws java.lang.Exception
java.lang.Exception
public void handleNotification(javax.management.Notification notification, java.lang.Object handback)
handleNotification
in interface javax.management.NotificationListener
notification
- the notification objecthandback
- the handback object given to the broadcaster upon listener registrationpublic void makeInvocation(java.lang.String locatorURI) throws java.lang.Throwable
locatorURI
- the URI of the remote server we want to send the message to
java.lang.Throwable
public static void main(java.lang.String[] args)
args
- unusedpublic static void println(java.lang.String msg)
msg
- the message to outputprotected java.util.Map getConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |