01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.axis2.jaxws.spi.migrator;
20:
21: import org.apache.axis2.jaxws.core.MessageContext;
22:
23: import java.util.Map;
24:
25: /**
26: * The ContextPropertyMigrator is a utility interface that can be implemented to handle any
27: * transformation or migration that needs to happen between the internal JAX-WS MessageContext for a
28: * request or a response and the associated context for the client or the server.
29: * <p/>
30: * client - On the client side, this will be called with the request or response context from the
31: * BindingProvider instance.
32: * <p/>
33: * server - On the server side, this will be called with the javax.xml.ws.handler.MessageContext
34: * instance that the service endpoint will see. This is the same context that will be injected
35: */
36: public interface ApplicationContextMigrator {
37:
38: /**
39: * Is called to handle property migration FROM the user context (BindingProvider client context
40: * or server MessageContext) TO a target internal org.apache.axis2.jaxws.core.MessageContext.
41: *
42: * @param userContext - The source context that contains the user context properties.
43: * @param messageContext - The target MessageContext to receive the properties.
44: */
45: public void migratePropertiesToMessageContext(
46: Map<String, Object> userContext,
47: MessageContext messageContext);
48:
49: /**
50: * Is called to handle property migratom FROM the internal org.apache.axis2.jaxws.core.MessageContext
51: * TO a target user context (BindingProvider client context or server MessageContext) that the
52: * user will access.
53: *
54: * @param userContext - The target user context to receive the properties.
55: * @param messageContext - The source MessageContext that contains the property values.
56: */
57: public void migratePropertiesFromMessageContext(
58: Map<String, Object> userContext,
59: MessageContext messageContext);
60:
61: }
|