|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.karmi.rmi.Transport
Main class of the transport layer. The transport class loads a properties file (filename in the "uka.karmi.config" property) on startup. This file is used to determine the technology objects, the DGC objects and the RegistryImpl object. It also contains information to individually configure the technology objects.
Whenever a stub is unmarshaled, the SingleRemoteClientRef uses the transport to determines which technology can contact its referenced server. This is done with the connect() method.
| Field Summary | |
static ConfigBundle |
config
|
private static EnlargingArray |
exportPoints
|
private static CopyEnvironment |
freeEnvList
|
private static java.lang.Object |
freeEnvLock
|
static java.lang.String |
KARMI_REGISTRY_CLASS
class name for a registry object |
private static java.util.ArrayList |
technologies
|
| Constructor Summary | |
Transport()
|
|
| Method Summary | |
static ObjectId |
addProxy(ObjectId id,
RemoteServerRef proxyRef)
|
protected static void |
addTechnology(Technology t)
|
static UTID |
buildUTID(java.lang.String protocol,
java.lang.String location)
Finds the technology that corresponds to the protocol string given as parameter and calls buildUTID on this technology. |
static UTID |
connect(ObjectId id)
Lookup a suitable technology in the given ObjectId structure and return its UTID. |
static Registry |
createRegistry(int nr)
Creates a registry object in a certain export point. |
static void |
dump()
|
static void |
exportObject(RemoteServerRef ref,
int nr,
int objectId)
|
static CopyEnvironment |
getCopyEnvironment()
Returns a CopyEnvironment object from a list. |
private static ExportPoint |
getExportPoint(int nr)
Creates and initializes an export point with a given number. |
static ObjectId |
getProxy(ObjectId id,
int domainId)
Checks whether the object identified by id can be
accessed from a technology with the given domain identifier. |
protected static Technology |
getTechnology(int n)
|
static int |
getTechnologyCnt()
|
static UTID |
getUTID(int nr)
Returns the UTIDs of the specified export point. |
(package private) static java.lang.Object |
newSystemInstance(java.lang.String name)
|
static void |
pinObject(RemoteServerRef ref)
Pins the object referenced by the given remote server reference. |
static void |
probe()
|
static void |
putCopyEnvironment(CopyEnvironment env)
Puts a CopyEnvironment back into a list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String KARMI_REGISTRY_CLASS
private static java.util.ArrayList technologies
private static EnlargingArray exportPoints
public static ConfigBundle config
private static java.lang.Object freeEnvLock
private static CopyEnvironment freeEnvList
| Constructor Detail |
public Transport()
| Method Detail |
protected static final Technology getTechnology(int n)
protected static final void addTechnology(Technology t)
public static final int getTechnologyCnt()
static java.lang.Object newSystemInstance(java.lang.String name)
public static void probe()
throws java.lang.Exception
java.lang.ExceptionProbepublic static void dump()
public static ObjectId getProxy(ObjectId id,
int domainId)
throws RemoteException
id can be
accessed from a technology with the given domain identifier. If
the check succeeds, the object identifier of the proxy is
returned that can be used for communication. This object
identifier may also be the identifier for the original object
passed as argument.
RemoteException
public static ObjectId addProxy(ObjectId id,
RemoteServerRef proxyRef)
throws RemoteException
RemoteException
public static UTID connect(ObjectId id)
throws RemoteException
Lookup a suitable technology in the given ObjectId structure
and return its UTID. If the referenced object is local,
the server implementation can be found in the local export
point referenced from the returned UTID object in its
UTID.ep member.
The returned UTID can be used to perform calls to
this object. The transient fields UTID.technology,
UTID.ep and UTID.objectId are initialized.
id - object identifier, a suitable technology is requested for.
RemoteExceptionObjectId
private static ExportPoint getExportPoint(int nr)
throws RemoteException
RemoteException
public static void exportObject(RemoteServerRef ref,
int nr,
int objectId)
throws RemoteException
ref - server side reference of the object to export.objectId - ID for this object. Must be 0 or 1..WELLKNOWN.nr - ID of the export point the object should be
exported to.
RemoteExceptionRemoteServerRef,
ExportPoint
public static void pinObject(RemoteServerRef ref)
throws RemoteException
RemoteException
public static UTID getUTID(int nr)
throws RemoteException
nr - ID of the export point.
RemoteException
public static Registry createRegistry(int nr)
throws RemoteException
RemoteException
public static UTID buildUTID(java.lang.String protocol,
java.lang.String location)
throws RemoteException
protocol - protocol stringlocation - loction of the remote host
RemoteExceptionpublic static CopyEnvironment getCopyEnvironment()
public static void putCopyEnvironment(CopyEnvironment env)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||