Package gda.jython
Interface IJythonNamespace
- All Known Implementing Classes:
JythonServerFacade,MockJythonServerFacade
public interface IJythonNamespace
For objects with access to the Jython Server namespace.
-
Method Summary
Modifier and TypeMethodDescriptionReturns all names for an Object in the Jython namespacegetAllNamesForType(Class<F> clazz) As a Collection, this should be able to be passed over any serialisation method and is therefore available to client code. getFromJythonNamespace(String objectName) Get a copy of an object from the Jython interpreter.voidplaceInJythonNamespace(String objectName, Object obj) Pass a copy of an object to the Jython interpreter.
-
Method Details
-
placeInJythonNamespace
Pass a copy of an object to the Jython interpreter. This object must be relatively simple otherwise it will not be passed over CORBA successfully. So the object must be a native type (or only contain native types) and must not have any object references inside.- Parameters:
objectName-obj-
-
getFromJythonNamespace
Get a copy of an object from the Jython interpreter. Note that the retrieved object will have to be cast by the local code. As the object will be passed over CORBA, this method should only be used on native types or classes containing only native types.- Parameters:
objectName-- Returns:
- Object
-
getAllNamesForObject
Returns all names for an Object in the Jython namespace- Parameters:
obj-- Returns:
- All names that refer to the Object in the Jython namespace
- Throws:
DeviceException
-
getAllNamesForType
As a Collection, this should be able to be passed over any serialisation method and is therefore available to client code. We may have e.g. Scannables written entirely in Jython that we may not be able to pass across, meaning the similar method LocalJython#getAllObjectsOfTypeis limited to server side.- Parameters:
clazz- a Class extending Findable- Returns:
- a set of all names of all objects of a type in the Jython namespace.
-