RegistrationImpl.java |
1 /* 2 * Copyright 2000-2001,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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, java.io.Serializable { 39 //a WSRP registration context 40 private RegistrationContext context = null; 41 42 //WSRP registration data 43 private RegistrationData data = null; 44 45 /** 46 * Returns the registration context. The registration context contains a 47 * registration handle (required) and optionally a registration state. 48 * 49 * @return RegistrationContext 50 */ 51 public RegistrationContext getRegistrationContext() { 52 return this.context; 53 } 54 55 /** 56 * Returns the registration data. Supplies consumer data required for 57 * registration with a Producer. 58 * 59 * @return RegistrationData 60 */ 61 public RegistrationData getRegistrationData() { 62 return this.data; 63 } 64 65 /** 66 * Sets the registration context. The registration context contains a 67 * registration handle (required) and optionally a registration state. 68 * 69 * @param registrationContext The registration context of a certain Consumer. 70 */ 71 public void setRegistrationContext(RegistrationContext registrationContext) { 72 this.context = registrationContext; 73 } 74 75 /** 76 * Sets the registration data. Supplies consumer data required for 77 * registration with a Producer. 78 * 79 * @param registrationData The registration data of a certain Consumer. 80 */ 81 public void setRegistrationData(RegistrationData registrationData) { 82 this.data = registrationData; 83 } 84 85 }