org.lateralnz.messaging.multicast
Class MulticastMessageHandlerFactory

java.lang.Object
  extended by org.lateralnz.messaging.multicast.MulticastMessageHandlerFactory

public class MulticastMessageHandlerFactory
extends java.lang.Object

factory class for notification handlers, so we don't have to instantiate multiple copies. (in other words, there should be only one notification handler in a VM per IP address & port)


Method Summary
 MessageHandler getDefaultHandler()
          get the default handler
 MessageHandler getHandler(java.lang.String ipaddress, int port)
          get the handler with the specified ip address and port
static MulticastMessageHandlerFactory getInstance()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final MulticastMessageHandlerFactory getInstance()

getHandler

public MessageHandler getHandler(java.lang.String ipaddress,
                                 int port)
                          throws java.lang.Exception
get the handler with the specified ip address and port

Throws:
java.lang.Exception

getDefaultHandler

public MessageHandler getDefaultHandler()
                                 throws java.lang.Exception
get the default handler

Throws:
java.lang.Exception

main

public static final void main(java.lang.String[] args)