DBA Data[Home] [Help]

PACKAGE: APPS.XDP_ADAPTER_CORE

Source


1 PACKAGE XDP_ADAPTER_CORE  AUTHID CURRENT_USER AS
2 /* $Header: XDPACORS.pls 120.1 2005/06/15 21:50:52 appldev  $ */
3 
4 e_ReceiveTimedOut exception;
5 e_ReceiveOtherError exception;
6 
7 e_AdapterWarningException exception;
8 e_AdapterErrorException exception;
9 
10 pv_DefTimeout number := 120;
11 
12 pv_DBMSPipeTimeoutError number := 1;
13 g_AdapterTimeout number := -20620;
14 g_AdapterSessionLost number := -20610;
15 
16 pv_AdapterResponseSuccess VARCHAR2(30) 	:= 'SUCCESS';
17 pv_AdapterResponseFailure VARCHAR2(30) 	:= 'FAILURE';
18 
19 pv_ProcessCommandTimedout VARCHAR2(30) 	:= 'TIMEOUT';
20 pv_ProcessCommandError VARCHAR2(30) 	:= 'ERROR';
21 
22 pv_AdapterTermFailure varchar2(40) 		:= 'ADAPTER_TERM_FAILURE';
23 pv_AdapterSysDeactivated varchar2(40) 		:= 'ADAPTER_SYS_DEACTIVATED';
24 
25 -- Send a SYNC Control Message to the Adapter
26 -- The Procedure waits for an ACK
27 Procedure SendSync( p_ChannelName in varchar2,
28 		    p_CleanupPipe in varchar2 default 'Y');
29 
30 -- Send a Response to the Adapter
31 -- The Response sent is an XML message of the type RESPONSE
32 -- The Procedure does NOT wait for an ACK
33 Procedure SendResponse(p_ChannelName in varchar2,
34 		       p_Status in varchar2,
35 		       p_Message in varchar2);
36 -- Send the ACK Response
37 Procedure SendAck(p_ChannelName in varchar2);
38 
39 -- Send any Control Command to the adapter
40 -- The Control Command XML is constructed and sent
41 -- The Procedure waits for an ACK
42 Procedure SendControlCommand(	p_ChannelName in varchar2,
43 				p_Operation in varchar2,
44 				p_OpData   in varchar2 default null);
45 
46 -- Send any Control Command to the adapter
47 -- The Control Command XML is constructed and sent
48 -- The Procedure waits for an ACK This procedure is same as the previous
49 -- Procedure except that the procedure returns a timeout value to wait for
50 -- for any response from the Adapter.
51 
52 Procedure SendControlCommand(	p_ChannelName in varchar2,
53 				p_Operation in varchar2,
54 				p_OpData in varchar2 default null,
55 				p_Timeout OUT NOCOPY number);
56 
57 -- Process any Control Command to the adapter
58 -- The Control Command XML is constructed and sent
59 -- The Procedure waits for an ACK
60 -- Once the ACK is received the routine waits for the control command
61 -- to be processed by the adapter;
62 Procedure ProcessControlCommand(p_ChannelName in varchar2,
63 				p_Operation in varchar2,
64 				p_OpData in varchar2 default null,
65 				p_Status OUT NOCOPY varchar2,
66 				p_ErrorMessage OUT NOCOPY varchar2);
67 
68 -- Perform the two way communication with the adapter.
69 -- Send a control command and wait for an ACK.
70 Procedure TalkToAdapter(p_ChannelName in varchar2,
71 		     	p_Command in varchar2);
72 
73 -- Send an Application Message.
74 -- Data in the users SEND Constuct in the FP will be the sent in an XML
75 -- Format
76 -- The Procedure Waits for an ACK
77 Procedure SendApplicationMessage(p_ChannelName in varchar2,
78 				 p_Command in varchar2,
79 				 p_Response in varchar2);
80 
81 -- Wait for an ACK from the other party
82 Procedure ReceiveAck(p_ChannelName in varchar2,
83 		     p_Status OUT NOCOPY varchar2,
84 		     p_ErrorMessage OUT NOCOPY varchar2);
85 
86 Procedure SendMessage(	p_ChannelName in varchar2,
87 			p_Command in varchar2);
88 
89 Procedure WaitForMessage(p_ChannelName  in varchar2,
90 			 p_Timeout in number,
91 			 p_ResponseMessage OUT NOCOPY varchar2);
92 
93 Function VerifyAdapterOperation(p_ChannelName in varchar2,
94 				p_Operation in varchar2,
95 				p_CurrentStatus OUT NOCOPY varchar2)  return boolean;
96 
97 Function ShouldAdapterConnect(p_ChannelName in varchar2) return varchar2;
98 
99 -- Send Notification to inform that the Adapter could not be terminated
100 Procedure NotifyAdapterTerminateFailure (p_AdapterName in VARCHAR2,
101 			p_NotifRecipient IN VARCHAR2 DEFAULT NULL);
102 
103 -- Send Notification to inform that the Adapter has been deactivated by System
104 Procedure NotifyAdapterSysDeactivation (p_AdapterName in VARCHAR2,
105 			p_NotifRecipient IN VARCHAR2 DEFAULT NULL);
106 
107 END XDP_ADAPTER_CORE;