|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpy4j.Gateway
public class Gateway
A Gateway manages various states: entryPoint, references to objects returned to a Python program, etc.
This class is not intended to be directly accessed by users.
Constructor Summary | |
---|---|
Gateway(Object entryPoint)
|
|
Gateway(Object entryPoint,
CallbackClient cbClient)
|
Method Summary | |
---|---|
void |
closeConnection()
Called when a connection is closed. |
void |
deleteObject(String objectId)
|
protected AtomicInteger |
getArgCounter()
|
protected Map<String,Object> |
getBindings()
|
CallbackClient |
getCallbackClient()
|
Object |
getEntryPoint()
|
protected String |
getNextObjectId()
|
protected AtomicInteger |
getObjCounter()
|
Object |
getObject(String objectId)
|
protected Object |
getObjectFromId(String targetObjectId)
|
py4j.reflection.ReflectionEngine |
getReflectionEngine()
|
ReturnObject |
getReturnObject(Object object)
|
ReturnObject |
invoke(String fqn,
List<Object> args)
Invokes a constructor and returned the constructed object. |
ReturnObject |
invoke(String methodName,
String targetObjectId,
List<Object> args)
Invokes a method. |
protected boolean |
isArray(Object object)
|
protected boolean |
isList(Object object)
|
protected boolean |
isMap(Object object)
|
protected boolean |
isPrimitiveObject(Object object)
|
protected boolean |
isSet(Object object)
|
boolean |
isStarted()
|
protected String |
putNewObject(Object object)
|
Object |
putObject(String id,
Object object)
|
void |
setStarted(boolean isStarted)
|
void |
shutdown()
Releases all objects that were referenced by this Gateway. |
void |
startup()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Gateway(Object entryPoint)
public Gateway(Object entryPoint, CallbackClient cbClient)
Method Detail |
---|
public void closeConnection()
Called when a connection is closed.
public void deleteObject(String objectId)
protected AtomicInteger getArgCounter()
protected Map<String,Object> getBindings()
public CallbackClient getCallbackClient()
public Object getEntryPoint()
protected String getNextObjectId()
protected AtomicInteger getObjCounter()
public Object getObject(String objectId)
objectId
-
protected Object getObjectFromId(String targetObjectId)
public py4j.reflection.ReflectionEngine getReflectionEngine()
public ReturnObject getReturnObject(Object object)
public ReturnObject invoke(String fqn, List<Object> args)
Invokes a constructor and returned the constructed object.
fqn
- The fully qualified name of the class.args
-
public ReturnObject invoke(String methodName, String targetObjectId, List<Object> args)
Invokes a method.
methodName
- targetObjectId
- args
-
protected boolean isArray(Object object)
protected boolean isList(Object object)
protected boolean isMap(Object object)
protected boolean isPrimitiveObject(Object object)
protected boolean isSet(Object object)
public boolean isStarted()
protected String putNewObject(Object object)
public Object putObject(String id, Object object)
public void setStarted(boolean isStarted)
public void shutdown()
Releases all objects that were referenced by this Gateway.
public void startup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |