public class PortTypeWrapper extends HandleChain implements PersistentProcedure, AsyncRequestListener
ExternalProgramWrapper
implementation, port-type procedures are limited, most of the
APIs being no-op or returning default values. Only the following procedure-specific APIs are
implemented by port-types too:
Modifier and Type | Field and Description |
---|---|
private character |
admData
The ADM-DATA of this port-type procedure.
|
private long |
asyncRequestCount
The number of active asynchronous requests.
|
private static java.lang.String |
CALLBACK_REQUEST_HEADER
Constant identifying the
REQUEST-HEADER callback. |
private static java.lang.String |
CALLBACK_RESPONSE_HEADER
Constant identifying the
RESPONSE-HEADER callback. |
private boolean |
deleted
Flag indicating if this port-type procedure was deleted or not.
|
private handle |
requestHeaderContext
The context for the request-header procedure.
|
private character |
requestHeaderProc
The name of request-header callback procedure.
|
private handle |
responseHeaderContext
The context for the response-header procedure.
|
private character |
responseHeaderProc
The name of response-header callback procedure.
|
private ServerImpl |
server
The
ServerImpl instance associated with this port-type procedure. |
private integer |
uniqueId
The UNIQUE-ID of this port-type procedure.
|
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
PortTypeWrapper(java.lang.String name,
ServerImpl server)
Instantiate a new port-type procedure by specifying the port-type name and the associated
ServerImpl instance. |
Modifier and Type | Method and Description |
---|---|
logical |
addSuperProcedure(handle h)
Implements the
ADD-SUPER-PROCEDURE method. |
logical |
addSuperProcedure(handle h,
int mode)
Implements the
ADD-SUPER-PROCEDURE method. |
logical |
addSuperProcedure(handle h,
integer mode)
Implements the
ADD-SUPER-PROCEDURE method. |
logical |
addSuperProcedure(handle h,
ProcedureManager.SearchMode mode)
Implements the
ADD-SUPER-PROCEDURE method. |
handle |
currentWindow()
Get CURRENT-WINDOW attribute for given procedure handle.
|
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
integer |
getAsyncRequestCount()
Returns the number of asynchronous requests.
|
character |
getFileName()
Get the
file-name attribute of this handle. |
character |
getPublishedEvents()
Implements the
PUBLISHED-EVENTS attribute. |
(package private) handle |
getRequestHeaderContext()
Get the
requestHeaderContext for this port-type. |
(package private) java.lang.String |
getRequestHeaderProc()
Get the
requestHeaderProc for this port-type. |
(package private) handle |
getResponseHeaderContext()
Get the
responseHeaderContext for this port-type. |
(package private) java.lang.String |
getResponseHeaderProc()
Get the
responseHeaderProc for this port-type. |
(package private) ServerImpl |
getServer()
Get the
ServerImpl instance associated with this port-type. |
handle |
getServerHandle()
Returns a handle to the app server in which the procedure is ran.
|
character |
getSignature(character internalEntry)
Implements the
GET-SIGNATURE method. |
character |
getSignature(java.lang.String internalEntry)
Implements the
GET-SIGNATURE method. |
handle |
getTransaction()
This is a no-op, always return unknown handle.
|
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the underlying system.
|
void |
initFileInfo(character name)
Displays "FILE-INFO is not a setable attribute for PROCEDURE widget" error message.
|
void |
initFileInfo(java.lang.String name)
Displays "FILE-INFO is not a setable attribute for PROCEDURE widget" error message.
|
character |
internalEntries()
Implements the
INTERNAL-ENTRIES attribute. |
logical |
isPersistent()
Get the
persistent attribute of this port-type procedure. |
logical |
isProxy()
This is a no-op, always return
false . |
logical |
isRemote()
Implements the
REMOTE attribute. |
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)
Implements the
REMOVE-SUPER-PROCEDURE method. |
protected boolean |
resourceDelete()
Check if this port-type procedure can be deleted.
|
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
logical |
setCallbackProcedure(character event,
character proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
character proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
java.lang.String proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(character event,
java.lang.String proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
character proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
character proc,
handle context)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
java.lang.String proc)
Associate the internal procedure with the given web-services event.
|
logical |
setCallbackProcedure(java.lang.String event,
java.lang.String proc,
handle context)
Associate the internal procedure with the given web-services event.
|
void |
setCurrentWindow(handle h)
Set CURRENT-WINDOW attribute for this procedure handle.
|
void |
setCurrentWindow(WindowWidget win)
Set CURRENT-WINDOW attribute for this procedure handle.
|
character |
superProcedures()
Implements the
SUPER-PROCEDURES attribute. |
boolean |
valid()
Reports if this object is valid for use.
|
delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasNextSibling, hasParent, hasPrevSibling, hasPrivateData, interlink, isChained, lastResource, lastResource, name, name, name, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, implicitDeletion, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateData
getResourceType, readOnlyError
id, id, unknown
instantiatingProcedure
private static final java.lang.String CALLBACK_REQUEST_HEADER
REQUEST-HEADER
callback.private static final java.lang.String CALLBACK_RESPONSE_HEADER
RESPONSE-HEADER
callback.private final ServerImpl server
ServerImpl
instance associated with this port-type procedure.private final character admData
private final integer uniqueId
private final character requestHeaderProc
private final handle requestHeaderContext
private final character responseHeaderProc
private final handle responseHeaderContext
private long asyncRequestCount
private boolean deleted
PortTypeWrapper(java.lang.String name, ServerImpl server)
ServerImpl
instance.name
- The port-type name. This will be reported by the NAME and FILE-NAME attributes.server
- The associated server instance.public boolean valid()
A port-type is valid only if it was not yet deleted.
valid
in interface WrappedResource
true
if we are valid (can be used).public character getFileName()
file-name
attribute of this handle.getFileName
in interface CommonFile
public handle getServerHandle()
getServerHandle
in interface Remotable
public integer getAsyncRequestCount()
getAsyncRequestCount
in interface AsyncRequestCountAttribute
public logical isPersistent()
persistent
attribute of this port-type procedure.isPersistent
in interface PersistentProcedure
true
.public logical setCallbackProcedure(java.lang.String event, java.lang.String proc)
This method returns false if the event name is not valid.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true
if the event was registered.public logical setCallbackProcedure(character event, java.lang.String proc)
This method returns false if the event name is not valid.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true
if the event was registered.public logical setCallbackProcedure(java.lang.String event, character proc)
This method returns false if the event name is not valid.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true
if the event was registered.public logical setCallbackProcedure(character event, character proc)
This method returns false if the event name is not valid.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event, which will be executed using
the current THIS-PROCEDURE reference. To remove a callback mapping, set the this
parameter to the empty string.true
if the event was registered.public logical setCallbackProcedure(java.lang.String event, java.lang.String proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context
- The procedure handle where the internal procedure will be searched and executed.true
if the event was registered.public logical setCallbackProcedure(character event, java.lang.String proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context
- The procedure handle where the internal procedure will be searched and executed.true
if the event was registered.public logical setCallbackProcedure(java.lang.String event, character proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context
- The procedure handle where the internal procedure will be searched and executed.true
if the event was registered.public logical setCallbackProcedure(character event, character proc, handle context)
This method returns false if the event name is not valid or if the procedure's context is not a valid handle.
setCallbackProcedure
in interface PersistentProcedure
event
- The event name, must evaluate to one of the "REQUEST-HEADER" or the
"RESPONSE-HEADER" strings.proc
- The internal procedure to be executed for this event. To remove a callback
mapping, set the this parameter to the empty string.context
- The procedure handle where the internal procedure will be searched and executed.true
if the event was registered.public character getADMData()
getADMData
in interface ADMData
public void setADMData(java.lang.String value)
setADMData
in interface ADMData
value
- The new value.public void setADMData(character value)
setADMData
in interface ADMData
value
- The new value.public integer getUniqueID()
getUniqueID
in interface UniqueID
public character getPublishedEvents()
PUBLISHED-EVENTS
attribute.
This is a no-op for port-type procedures.
getPublishedEvents
in interface PersistentProcedure
public character superProcedures()
SUPER-PROCEDURES
attribute.
This is a no-op for port-type procedures.
superProcedures
in interface CommonProcedure
public logical addSuperProcedure(handle h)
ADD-SUPER-PROCEDURE
method.
This is a no-op for port-type procedures.
addSuperProcedure
in interface CommonProcedure
h
- The handle to be added as a super-procedure.false
.public logical addSuperProcedure(handle h, ProcedureManager.SearchMode mode)
ADD-SUPER-PROCEDURE
method.
This is a no-op for port-type procedures.
addSuperProcedure
in interface CommonProcedure
h
- The handle to be added as a super-procedure.mode
- The ProcedureManager.SearchMode
to be set for the h
handle.false
.public logical addSuperProcedure(handle h, int mode)
ADD-SUPER-PROCEDURE
method.
This is a no-op for port-type procedures.
addSuperProcedure
in interface CommonProcedure
h
- The handle to be added as a super-procedure.mode
- The search-mode to be set for the h
handle.false
.public logical addSuperProcedure(handle h, integer mode)
ADD-SUPER-PROCEDURE
method.
This is a no-op for port-type procedures.
addSuperProcedure
in interface CommonProcedure
h
- The handle to be added as a super-procedure.mode
- The search-mode to be set for the h
handle.false
.public logical removeSuperProcedure(handle h)
REMOVE-SUPER-PROCEDURE
method.
This is a no-op for port-type procedures.
removeSuperProcedure
in interface CommonProcedure
h
- The procedure handle to be removed.false
.public logical isRemote()
REMOTE
attribute.isRemote
in interface CommonProcedure
false
.public character internalEntries()
INTERNAL-ENTRIES
attribute.internalEntries
in interface PersistentProcedure
public character getSignature(java.lang.String internalEntry)
GET-SIGNATURE
method.getSignature
in interface PersistentProcedure
internalEntry
- The legacy name of the internal-entry for which the signature
is needed.public character getSignature(character internalEntry)
GET-SIGNATURE
method.getSignature
in interface PersistentProcedure
internalEntry
- The legacy name of the internal-entry for which the signature
is needed.public handle currentWindow()
currentWindow
in interface PersistentProcedure
public void setCurrentWindow(handle h)
This is a no-op, but the handle is validated.
setCurrentWindow
in interface PersistentProcedure
h
- A handle for the window.public void setCurrentWindow(WindowWidget win)
This is a no-op, but the window is validated.
setCurrentWindow
in interface PersistentProcedure
win
- Window reference.public logical isProxy()
false
.isProxy
in interface PersistentProcedure
false
.public handle getTransaction()
getTransaction
in interface PersistentProcedure
public void notifyStart()
notifyStart
in interface AsyncRequestListener
public void notifyFinish()
notifyFinish
in interface AsyncRequestListener
public void initFileInfo(character name)
initFileInfo
in interface CommonFile
name
- Not used.public void initFileInfo(java.lang.String name)
initFileInfo
in interface CommonFile
name
- Not used.protected boolean resourceDelete()
resourceDelete
in class HandleChain
true
if the port-type procedure can be deleted.ServerImpl getServer()
ServerImpl
instance associated with this port-type.java.lang.String getRequestHeaderProc()
handle getRequestHeaderContext()
requestHeaderContext
for this port-type.getRequestHeaderProc()
java.lang.String getResponseHeaderProc()
handle getResponseHeaderContext()
responseHeaderContext
for this port-type.getResponseHeaderProc()