net.sf.farrago.server
Class FarragoRJMedDataWrapperServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by net.sf.farrago.server.FarragoRJMedDataWrapperServer
All Implemented Interfaces:
Serializable, Remote, Unreferenced, FarragoRJMedDataWrapperInterface

 class FarragoRJMedDataWrapperServer
extends UnicastRemoteObject
implements FarragoRJMedDataWrapperInterface, Unreferenced

RMI server-side implementation of FarragoMedDataWrapperInfo.

This object is constructed with a factory for creating a data wrapper. Each method grabs a data wrapper from the factory, and releases it at the end of the method. This class is therefore stateless: data wrappers are never held between calls.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/server/FarragoRJMedDataWrapperServer.java#11 $
Author:
Tim Leung

Field Summary
private  FarragoConnection farragoConnection
           
private  String libraryName
           
private  String mofId
           
private  Properties options
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
FarragoRJMedDataWrapperServer(FarragoConnection farragoConnection, String mofId, String libraryName, Properties options)
           
 
Method Summary
 FarragoRJDriverPropertyInfo[] getColumnPropertyInfo(Locale locale, Properties wrapperProps, Properties serverProps, Properties tableProps, Properties columnProps)
           
 FarragoRJDriverPropertyInfo[] getColumnSetPropertyInfo(Locale locale, Properties wrapperProps, Properties serverProps, Properties tableProps)
           
 FarragoRJDriverPropertyInfo[] getPluginPropertyInfo(Locale locale, Properties wrapperProps)
           
 FarragoRJDriverPropertyInfo[] getServerPropertyInfo(Locale locale, Properties wrapperProps, Properties serverProps)
           
private  FarragoMedDataWrapperInfo getWrapper()
          Gets wrapper information from the server.
 boolean isForeign()
           
private  FarragoRJDriverPropertyInfo[] makeSerializable(DriverPropertyInfo[] infos)
           
 void unreferenced()
           
 
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

farragoConnection

private final FarragoConnection farragoConnection

mofId

private final String mofId

libraryName

private final String libraryName

options

private final Properties options
Constructor Detail

FarragoRJMedDataWrapperServer

FarragoRJMedDataWrapperServer(FarragoConnection farragoConnection,
                              String mofId,
                              String libraryName,
                              Properties options)
                        throws RemoteException
Throws:
RemoteException
Method Detail

unreferenced

public void unreferenced()
Specified by:
unreferenced in interface Unreferenced

getPluginPropertyInfo

public FarragoRJDriverPropertyInfo[] getPluginPropertyInfo(Locale locale,
                                                           Properties wrapperProps)
                                                    throws RemoteException
Specified by:
getPluginPropertyInfo in interface FarragoRJMedDataWrapperInterface
Throws:
RemoteException
See Also:
FarragoMedDataWrapperInfo.getPluginPropertyInfo(java.util.Locale, java.util.Properties)

getServerPropertyInfo

public FarragoRJDriverPropertyInfo[] getServerPropertyInfo(Locale locale,
                                                           Properties wrapperProps,
                                                           Properties serverProps)
                                                    throws RemoteException
Specified by:
getServerPropertyInfo in interface FarragoRJMedDataWrapperInterface
Throws:
RemoteException
See Also:
FarragoMedDataWrapperInfo.getServerPropertyInfo(java.util.Locale, java.util.Properties, java.util.Properties)

getColumnSetPropertyInfo

public FarragoRJDriverPropertyInfo[] getColumnSetPropertyInfo(Locale locale,
                                                              Properties wrapperProps,
                                                              Properties serverProps,
                                                              Properties tableProps)
                                                       throws RemoteException
Specified by:
getColumnSetPropertyInfo in interface FarragoRJMedDataWrapperInterface
Throws:
RemoteException
See Also:
FarragoMedDataWrapperInfo.getColumnSetPropertyInfo(java.util.Locale, java.util.Properties, java.util.Properties, java.util.Properties)

getColumnPropertyInfo

public FarragoRJDriverPropertyInfo[] getColumnPropertyInfo(Locale locale,
                                                           Properties wrapperProps,
                                                           Properties serverProps,
                                                           Properties tableProps,
                                                           Properties columnProps)
                                                    throws RemoteException
Specified by:
getColumnPropertyInfo in interface FarragoRJMedDataWrapperInterface
Throws:
RemoteException
See Also:
FarragoMedDataWrapperInfo.getColumnPropertyInfo(java.util.Locale, java.util.Properties, java.util.Properties, java.util.Properties, java.util.Properties)

isForeign

public boolean isForeign()
                  throws RemoteException
Specified by:
isForeign in interface FarragoRJMedDataWrapperInterface
Throws:
RemoteException
See Also:
FarragoMedDataWrapperInfo.isForeign()

getWrapper

private FarragoMedDataWrapperInfo getWrapper()
                                      throws RemoteException
Gets wrapper information from the server.

This FarragoMedDataWrapperInfo is leak-proof -- unlike a FarragoMedDataWrapper, we don't have to worry about freeing it.

Throws:
RemoteException

makeSerializable

private FarragoRJDriverPropertyInfo[] makeSerializable(DriverPropertyInfo[] infos)