KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > webservice > monitoring > GlobalMessageListener


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.webservice.monitoring;
25
26 /**
27  * This interface permits implementors to register a global message listener
28  * which will be notified for all the web services requests and responses
29  * on installed and enabled Web Services. Each invocation will be notified
30  * through founr callbacks (preProcessRequest, processRequest, processResponse,
31  * postProcessResponse).
32  *
33  * @author Jerome Dochez
34  */

35 public interface GlobalMessageListener {
36
37     /**
38      * Callback when a web service request entered the web service container
39      * and before any system processing is done.
40      * @param endpoint is the endpoint the web service request is targeted to
41      * @return a message ID to trace the request in the subsequent callbacks
42      * or null if this invocation should not be traced further.
43      */

44     public String JavaDoc preProcessRequest(Endpoint endpoint);
45     
46     /**
47      * Callback when a 1.X web service request is about the be delivered to the
48      * Web Service Implementation Bean.
49      * @param mid message ID returned by preProcessRequest call
50      * @param trace the jaxrpc message trace, transport dependent
51      */

52     public void processRequest(String JavaDoc mid, com.sun.xml.rpc.spi.runtime.SOAPMessageContext ctx, TransportInfo info);
53     
54     /**
55      * Callback when a 1.X web service response was returned by the Web Service
56      * Implementation Bean
57      * @param mid message ID returned by the preProcessRequest call
58      * @param trace jaxrpc message trace, transport dependent.
59      */

60     public void processResponse(String JavaDoc mid, com.sun.xml.rpc.spi.runtime.SOAPMessageContext ctx);
61     
62     /**
63      * Callback when a 2.X web service request is about the be delivered to the
64      * Web Service Implementation Bean.
65      * @param mid message ID returned by preProcessRequest call
66      * @param trace the jaxrpc message trace, transport dependent
67      */

68     public void processRequest(String JavaDoc mid, com.sun.xml.ws.spi.runtime.SOAPMessageContext ctx, TransportInfo info);
69     
70     /**
71      * Callback when a 2.X web service response was returned by the Web Service
72      * Implementation Bean
73      * @param mid message ID returned by the preProcessRequest call
74      * @param trace jaxrpc message trace, transport dependent.
75      */

76     public void processResponse(String JavaDoc mid, com.sun.xml.ws.spi.runtime.SOAPMessageContext ctx);
77     
78     /**
79      * Callback when a web service response has finished being processed
80      * by the container and was sent back to the client
81      * @param mid returned by the preProcessRequest call
82      * @param info the response transport dependent information
83      */

84     public void postProcessResponse(String JavaDoc mid, TransportInfo info);
85     
86 }
87
Popular Tags