edu.uci.isr.yancees.client.rmi
Class YanceesRMIClient

java.lang.Object
  extended byedu.uci.isr.yancees.client.rmi.YanceesRMIClient
All Implemented Interfaces:
YanceesInterface

public class YanceesRMIClient
extends java.lang.Object
implements YanceesInterface

Author:
Roberto Silveira Silva Filho [rsilvafi@ics.uci.edu] This is the API used by remote clients to interact with the YANCEES server. It hides from the end users, the code necessary to connect to the remote server. This API does not support client-side plug-ins. It works as a direct connection between client and server, allowing a faster interaction in this case. Client-side plug-ins are supported in another API, @see YanceesClient.java

Nested Class Summary
 class YanceesRMIClient.SubscriberMediator
          The subscriber mediator receives notifications from the plug-ins and forward them to their specific subscribers.
 
Constructor Summary
YanceesRMIClient(java.lang.String hostname)
          Creates a client implementation and automatically connects to the address provided
 
Method Summary
 ProtocolSessionInterface createNewSession(MessageInterface msg, SubscriberInterface si)
           
 void publish(EventInterface evt)
           
 void resumeYancees()
           
 void shutdownYancees()
           
 void subscribe(MessageInterface msg, SubscriberInterface si)
           
 void suspendYancees()
           
 void unsubscribe(SubscriberInterface si)
           
 void unsubscribe(SubscriberInterface si, MessageInterface sub)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YanceesRMIClient

public YanceesRMIClient(java.lang.String hostname)
                 throws YanceesException
Creates a client implementation and automatically connects to the address provided

Parameters:
hostname - is the name of the host having the RMI registry where the YANCEES interface is registered. This host name will compose
Method Detail

createNewSession

public ProtocolSessionInterface createNewSession(MessageInterface msg,
                                                 SubscriberInterface si)
                                          throws YanceesException
Specified by:
createNewSession in interface YanceesInterface
Throws:
YanceesException

publish

public void publish(EventInterface evt)
             throws YanceesException
Specified by:
publish in interface YanceesInterface
Throws:
YanceesException

resumeYancees

public void resumeYancees()
                   throws YanceesException
Specified by:
resumeYancees in interface YanceesInterface
Throws:
YanceesException

shutdownYancees

public void shutdownYancees()
                     throws YanceesException
Specified by:
shutdownYancees in interface YanceesInterface
Throws:
YanceesException

subscribe

public void subscribe(MessageInterface msg,
                      SubscriberInterface si)
               throws YanceesException
Specified by:
subscribe in interface YanceesInterface
Throws:
YanceesException

suspendYancees

public void suspendYancees()
                    throws YanceesException
Specified by:
suspendYancees in interface YanceesInterface
Throws:
YanceesException

unsubscribe

public void unsubscribe(SubscriberInterface si,
                        MessageInterface sub)
                 throws YanceesException
Specified by:
unsubscribe in interface YanceesInterface
Throws:
YanceesException

unsubscribe

public void unsubscribe(SubscriberInterface si)
                 throws YanceesException
Specified by:
unsubscribe in interface YanceesInterface
Throws:
YanceesException