public class ProxyProcedureWrapper extends ExternalProgramWrapper implements RemoteResource, AsyncRequestListener
Otherwise, the procedure handle on the remote and the requester side are not linked. Changes performed to the resource on one side are not visible on the other side. Only the NAME and FILE-NAME attributes are in sync with the remote side, when accessed from the requester side.
| Modifier and Type | Field and Description |
|---|---|
private int |
agentId
The agent ID which created this procedure.
|
private long |
asyncRequestCount
Count the number of active async internal-entry requests.
|
private java.lang.String |
fileName
The name of this proxy procedure.
|
private boolean |
initialized
Flag indicating if the proxy procedure has been initialized on the remote side.
|
private ProxyProcedureWrapper |
next
The next proxy procedure (in the same server).
|
private ProxyProcedureWrapper |
prev
The previous proxy procedure (in the same server).
|
private ServerImpl |
server
The server used to obtain this proxy procedure.
|
pmreferent| Constructor and Description |
|---|
ProxyProcedureWrapper(java.lang.String code,
character fileName,
int agentId)
Instantiate a new proxy procedure.
|
| Modifier and Type | Method and Description |
|---|---|
logical |
addSuperProcedure(handle h)
This call is a no-op on proxy procedures, always returns
false. |
void |
delete()
Delete this proxy procedure (from the requester side) and the associated remote procedure on
the appserver side.
|
boolean |
equals(java.lang.Object obj)
Determines if this instance and the passed-in instance are equivalent.
|
int |
getAgentId()
Get the agent ID, which created the remote procedure for this proxy.
|
integer |
getAsyncRequestCount()
Returns the number of asynchronous requests.
|
character |
getFileName()
Get the external program name associated with the proxy procedure.
|
handle |
getNextSibling()
Get a handle for the next chained procedure.
|
handle |
getPrevSibling()
Get a handle for the previous procedure in the chain.
|
java.lang.String |
getResourceId()
Get the ID of this remote resource.
|
(package private) ServerImpl |
getServer()
Get the
server instance for this proxy procedure. |
handle |
getServerHandle()
Returns a handle to the app server in which the procedure is ran.
|
character |
getSignature(character internalEntry)
This call is a no-op on proxy procedures, always returns the empty string.
|
boolean |
handleMultipleDeletes()
Such procedures can't handle multiple deletes, so this call should fail.
|
int |
hashCode()
Calculate the hash, considering the
agentId. |
character |
internalEntries()
This call is a no-op on proxy procedures, always returns the unknown.
|
(package private) boolean |
isInitialized()
Check the
initialized state. |
logical |
isPersistent()
Check if this is a persistent procedure.
|
logical |
isProxy()
Indicates if the procedure is a proxy procedure.
|
logical |
isRemote()
Indicate if the procedure is a remote procedure.
|
void |
notifyFinish()
Called when the async call of an internal-entry for proxy procedure has finished.
|
void |
notifyStart()
Called when an internal-entry of this proxy procedure is invoked async.
|
logical |
removeSuperProcedure(handle h)
This call is a no-op on proxy procedures, always returns
false. |
void |
setInitialized(boolean initialized)
Mark this proxy procedure as initialized on the remote side (its 'execute' method was invoked).
|
(package private) void |
setNextSibling(ProxyProcedureWrapper proxyProcedure)
Add the passed
proxyProcedure as the next one in the chain. |
(package private) void |
setPrevSibling(ProxyProcedureWrapper proxyProcedure)
Add the passed
proxyProcedure as the previous one in the chain. |
(package private) void |
setServer(ServerImpl server)
Set the server for this proxy procedure.
|
character |
superProcedures()
This call is a no-op on proxy procedures, always returns the empty string.
|
boolean |
valid()
Determine if this instance is valid.
|
(package private) void |
waitForInitialize()
Wait for this proxy procedure to be initialized (its 'execute' method invoked) on the remote side.
|
addSuperProcedure, addSuperProcedure, addSuperProcedure, applyCallback, currentWindow, deferredDelete, getADMData, getCallbackProcContext, getCallbackProcName, getPrivateData, getPublishedEvents, getSignature, getTransaction, getUniqueID, initFileInfo, initFileInfo, instantiatingProcedure, isSingleRun, isSingleton, name, name, name, readOnlyError, readOnlyError, resourceType, setADMData, setADMData, setCallback, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCurrentWindow, setCurrentWindow, setPrivateData, setPrivateDataclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitid, id, unknownapplyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallbacksetPersistent, setPersistentsetServerHandleallowDeleteprivate java.lang.String fileName
private ServerImpl server
private ProxyProcedureWrapper prev
private ProxyProcedureWrapper next
private long asyncRequestCount
private volatile boolean initialized
private int agentId
public ProxyProcedureWrapper(java.lang.String code,
character fileName,
int agentId)
code - The procedure handle code, as on the remote side.fileName - The name of this external program.agentId - The agent ID which created the remote procedure for this proxy.public int getAgentId()
agentId.public handle getServerHandle()
getServerHandle in interface RemotablegetServerHandle in class ExternalProgramWrapperpublic boolean valid()
valid in interface WrappedResourcevalid in class ExternalProgramWrappertrue if this instance is valid, false otherwise.public integer getAsyncRequestCount()
getAsyncRequestCount in interface AsyncRequestCountAttributegetAsyncRequestCount in class ExternalProgramWrapperpublic logical isProxy()
isProxy in interface PersistentProcedureisProxy in class ExternalProgramWrappertrue.public logical isRemote()
isRemote in interface CommonProcedureisRemote in class ExternalProgramWrapperfalsepublic character internalEntries()
internalEntries in interface PersistentProcedureinternalEntries in class ExternalProgramWrapperpublic character getSignature(character internalEntry)
getSignature in interface PersistentProceduregetSignature in class ExternalProgramWrapperinternalEntry - The legacy procedure/function name.public logical addSuperProcedure(handle h)
false.addSuperProcedure in interface CommonProcedureaddSuperProcedure in class ExternalProgramWrapperh - A procedure handle.public logical removeSuperProcedure(handle h)
false.removeSuperProcedure in interface CommonProcedureremoveSuperProcedure in class ExternalProgramWrapperh - A procedure handle.public character superProcedures()
superProcedures in interface CommonProceduresuperProcedures in class ExternalProgramWrapperpublic logical isPersistent()
isPersistent in interface PersistableProcedureisPersistent in class ExternalProgramWrappertrue, as proxy procedures are always persistent.public character getFileName()
getFileName in interface CommonFilegetFileName in class ExternalProgramWrapperpublic handle getNextSibling()
getNextSibling in interface CommonHandleChaingetNextSibling in class ExternalProgramWrapperpublic handle getPrevSibling()
getPrevSibling in interface CommonHandleChaingetPrevSibling in class ExternalProgramWrapperpublic void delete()
delete in interface Deletabledelete in class ExternalProgramWrapperpublic boolean handleMultipleDeletes()
handleMultipleDeletes in interface MultiDeletablehandleMultipleDeletes in class ExternalProgramWrapperfalse if this can't handle an invalid delete or true otherwise.public java.lang.String getResourceId()
getResourceId in interface RemoteResourcepublic void notifyStart()
notifyStart in interface AsyncRequestListenerpublic void notifyFinish()
notifyFinish in interface AsyncRequestListenerpublic void setInitialized(boolean initialized)
initialized - The initialized state.public int hashCode()
agentId.hashCode in class TransparentWrapperpublic boolean equals(java.lang.Object obj)
equals in class TransparentWrapperobj - The instance to compare against.true if the objects are the same.boolean isInitialized()
initialized state.void waitForInitialize()
void setPrevSibling(ProxyProcedureWrapper proxyProcedure)
proxyProcedure as the previous one in the chain.proxyProcedure - The proxy procedure to add to the chain.void setNextSibling(ProxyProcedureWrapper proxyProcedure)
proxyProcedure as the next one in the chain.proxyProcedure - The proxy procedure to add to the chain.void setServer(ServerImpl server)
server - A the ServerImpl instance.ServerImpl getServer()
server instance for this proxy procedure.