01: /*
02: * Copyright 2000-2001,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: /*
18:
19: */
20:
21: package org.apache.wsrp4j.producer.driver;
22:
23: import oasis.names.tc.wsrp.v1.types.RegistrationContext;
24: import oasis.names.tc.wsrp.v1.types.RegistrationData;
25:
26: import org.apache.wsrp4j.producer.Registration;
27:
28: /**
29: * <p>This class implements the Registration interface encapsulating
30: * a registration-object. Provides setters and getters.</p>
31: * <p>Implements the Serializable interface to enable serialization, e.g. to
32: * an XML-file.</p>
33: *
34: * @author <a href="mailto:stefan.behl@de.ibm.com">Stefan Behl</a>
35: *
36: * @see Registration
37: */
38: public class RegistrationImpl implements Registration,
39: java.io.Serializable {
40: //a WSRP registration context
41: private RegistrationContext context = null;
42:
43: //WSRP registration data
44: private RegistrationData data = null;
45:
46: /**
47: * Returns the registration context. The registration context contains a
48: * registration handle (required) and optionally a registration state.
49: *
50: * @return RegistrationContext
51: */
52: public RegistrationContext getRegistrationContext() {
53: return this .context;
54: }
55:
56: /**
57: * Returns the registration data. Supplies consumer data required for
58: * registration with a Producer.
59: *
60: * @return RegistrationData
61: */
62: public RegistrationData getRegistrationData() {
63: return this .data;
64: }
65:
66: /**
67: * Sets the registration context. The registration context contains a
68: * registration handle (required) and optionally a registration state.
69: *
70: * @param registrationContext The registration context of a certain Consumer.
71: */
72: public void setRegistrationContext(
73: RegistrationContext registrationContext) {
74: this .context = registrationContext;
75: }
76:
77: /**
78: * Sets the registration data. Supplies consumer data required for
79: * registration with a Producer.
80: *
81: * @param registrationData The registration data of a certain Consumer.
82: */
83: public void setRegistrationData(RegistrationData registrationData) {
84: this.data = registrationData;
85: }
86:
87: }
|