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 character |
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.
|
referent
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, getResourceType, getSignature, getTransaction, getUniqueID, initFileInfo, initFileInfo, instantiatingProcedure, isSingleRun, isSingleton, name, name, name, readOnlyError, readOnlyError, setADMData, setADMData, setCallback, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCurrentWindow, setCurrentWindow, setPrivateData, setPrivateData
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
id, id, unknown
applyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallback
setPersistent, setPersistent
setServerHandle
private final character 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 Remotable
getServerHandle
in class ExternalProgramWrapper
public boolean valid()
valid
in interface WrappedResource
valid
in class ExternalProgramWrapper
true
if this instance is valid, false
otherwise.public integer getAsyncRequestCount()
getAsyncRequestCount
in interface AsyncRequestCountAttribute
getAsyncRequestCount
in class ExternalProgramWrapper
public logical isProxy()
isProxy
in interface PersistentProcedure
isProxy
in class ExternalProgramWrapper
true
.public logical isRemote()
isRemote
in interface CommonProcedure
isRemote
in class ExternalProgramWrapper
false
public character internalEntries()
internalEntries
in interface PersistentProcedure
internalEntries
in class ExternalProgramWrapper
public character getSignature(character internalEntry)
getSignature
in interface PersistentProcedure
getSignature
in class ExternalProgramWrapper
internalEntry
- The legacy procedure/function name.public logical addSuperProcedure(handle h)
false
.addSuperProcedure
in interface CommonProcedure
addSuperProcedure
in class ExternalProgramWrapper
h
- A procedure handle.public logical removeSuperProcedure(handle h)
false
.removeSuperProcedure
in interface CommonProcedure
removeSuperProcedure
in class ExternalProgramWrapper
h
- A procedure handle.public character superProcedures()
superProcedures
in interface CommonProcedure
superProcedures
in class ExternalProgramWrapper
public logical isPersistent()
isPersistent
in interface PersistableProcedure
isPersistent
in class ExternalProgramWrapper
true
, as proxy procedures are always persistent.public character getFileName()
getFileName
in interface CommonFile
getFileName
in class ExternalProgramWrapper
public handle getNextSibling()
getNextSibling
in interface CommonHandleChain
getNextSibling
in class ExternalProgramWrapper
public handle getPrevSibling()
getPrevSibling
in interface CommonHandleChain
getPrevSibling
in class ExternalProgramWrapper
public void delete()
delete
in interface Deletable
delete
in class ExternalProgramWrapper
public boolean handleMultipleDeletes()
handleMultipleDeletes
in interface MultiDeletable
handleMultipleDeletes
in class ExternalProgramWrapper
false
if this can't handle an invalid delete or true
otherwise.public java.lang.String getResourceId()
getResourceId
in interface RemoteResource
public void notifyStart()
notifyStart
in interface AsyncRequestListener
public void notifyFinish()
notifyFinish
in interface AsyncRequestListener
public void setInitialized(boolean initialized)
initialized
- The initialized state.public int hashCode()
agentId
.hashCode
in class TransparentWrapper
public boolean equals(java.lang.Object obj)
equals
in class TransparentWrapper
obj
- 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.