tauZaman
v0.1

tauzaman
Class TauZamanRemoteServiceHandlerImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--tauzaman.TauZamanRemoteServiceHandlerImpl
All Implemented Interfaces:
java.rmi.Remote, java.io.Serializable, TauZamanRemoteServiceHandler

public class TauZamanRemoteServiceHandlerImpl
extends java.rmi.server.UnicastRemoteObject
implements TauZamanRemoteServiceHandler

TauZamanRemoteServiceHandlerImpl class implemets TauZamanRemoteServiceHandler interface, which enables a TauZamanSystem to be set as a server. Once this class is initialized and set, then clients can connect and fetch TauZamanRemoteServices from this class.

TauZamanRemoteServiceHandlerImpl is itself a remote class.

See Also:
TauZamanRemoteServiceHandler, TauZamanSystem, TauZamanRemoteService, Serialized Form
Status:
design complete, implementation complete

Field Summary
private  TauZamanSystem parentSystem
          A handle to parent TauZamanSystem
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteServer
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected TauZamanRemoteServiceHandlerImpl(TauZamanSystem parentSystem, boolean log)
          Constructs a TauZamanRemoteServiceHandlerImpl.
 
Method Summary
 TauZamanRemoteService getService(java.lang.String calendricSystemName, java.net.URL calendricSystemUrl, java.net.URL defaultPropertyListUrl)
          Returns a TauZamanRemoteService with a default CalendricSystem and Property list.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parentSystem

private TauZamanSystem parentSystem
A handle to parent TauZamanSystem

Constructor Detail

TauZamanRemoteServiceHandlerImpl

protected TauZamanRemoteServiceHandlerImpl(TauZamanSystem parentSystem,
                                           boolean log)
                                    throws java.rmi.RemoteException,
                                           java.io.FileNotFoundException
Constructs a TauZamanRemoteServiceHandlerImpl.

Parameters:
parentSystem - parent TauZamanSystem form which this class is instantiated
log - a boolean value, which determines if this server will keep logs of remote calls. If it is true, server keeps log, o.w. server will not keep log
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
java.io.FileNotFoundException - if log file can not be opened
Method Detail

getService

public TauZamanRemoteService getService(java.lang.String calendricSystemName,
                                        java.net.URL calendricSystemUrl,
                                        java.net.URL defaultPropertyListUrl)
                                 throws java.rmi.RemoteException,
                                        CalendricSystemFormationException,
                                        PropertyFormationException
Returns a TauZamanRemoteService with a default CalendricSystem and Property list.

Specified by:
getService in interface TauZamanRemoteServiceHandler
Parameters:
calendricSystemName - String name, given by user, which loaded default CalendricSystem will be referred as
calendricSystemUrl - default CalendricSystem for this TauZamanService
Returns:
a TauZamanRemoteService ready to serve
Throws:
java.rmi.RemoteException - if an abnormal condition occurs during remote connection
CalendricSystemFormationException - if any abnormal condition occurs when loading default CalendricSystem for the fetched remote service
PropertyFormationException - if any abnormal condition occurs when loading default Property list for the fetched remote service

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project