org.jboss.remoting.samples.detection.multicast
Class SimpleDetectorServer

java.lang.Object
  extended by org.jboss.remoting.samples.detection.multicast.SimpleDetectorServer

public class SimpleDetectorServer
extends java.lang.Object

A simple JBoss/Remoting remoting server. This uses an inner class SampleInvocationHandler as the invocation target handler class.

Author:
Tom Elrod, John Mazzitelli

Nested Class Summary
static class SimpleDetectorServer.SampleInvocationHandler
          Simple invocation handler implementation.
 
Constructor Summary
SimpleDetectorServer()
           
 
Method Summary
static void main(java.lang.String[] args)
          Can pass transport and port to be used as parameters.
static void println(java.lang.String msg)
          Outputs a message to stdout.
 void setupDetector()
          Sets up NetworkRegistry and MulticastDetector so will can register ourselves on the network.
 void setupServer(java.lang.String locatorURI)
          Sets up our JBoss/Remoting server by creating our Connector on the given locator URI and installing our invocation handler that will handle incoming messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDetectorServer

public SimpleDetectorServer()
Method Detail

setupDetector

public void setupDetector()
                   throws java.lang.Exception
Sets up NetworkRegistry and MulticastDetector so will can register ourselves on the network. We could also use these to listen ourselves for any additions or removals of remoting servers on the network.

Throws:
java.lang.Exception

setupServer

public void setupServer(java.lang.String locatorURI)
                 throws java.lang.Exception
Sets up our JBoss/Remoting server by creating our Connector on the given locator URI and installing our invocation handler that will handle incoming messages.

Parameters:
locatorURI - defines our server endpoing
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
Can pass transport and port to be used as parameters. Valid transports are 'rmi' and 'socket'.

Parameters:
args - transport and port number

println

public static void println(java.lang.String msg)
Outputs a message to stdout.

Parameters:
msg - the message to output


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.