001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.metadata;
023:
024: import java.io.Serializable;
025: import java.util.Collection;
026: import java.util.HashSet;
027:
028: /**
029: * Message listener meta data
030: *
031: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
032: * @version $Revision: 57189 $
033: */
034: public class MessageListenerMetaData implements Serializable {
035: private static final long serialVersionUID = -3196418073906964586L;
036:
037: /** The message listener type */
038: private String type;
039:
040: /** The activation spec type */
041: private String asType;
042:
043: /** The required properties */
044: private HashSet requiredProperties = new HashSet();
045:
046: /**
047: * Get the message listener type
048: *
049: * @return the message listener type
050: */
051: public String getType() {
052: return type;
053: }
054:
055: /**
056: * Set the message listener type
057: *
058: * @param type the message listener type
059: */
060: public void setType(String type) {
061: this .type = type;
062: }
063:
064: /**
065: * Get the activation spec type
066: *
067: * @return the activation spec type
068: */
069: public String getActivationSpecType() {
070: return asType;
071: }
072:
073: /**
074: * Set the activation spec type
075: *
076: * @param type the activation spec type
077: */
078: public void setActivationSpecType(String type) {
079: this .asType = type;
080: }
081:
082: /**
083: * Add a required config property
084: *
085: * @param rcpmd the required config property
086: */
087: public void addRequiredConfigProperty(
088: RequiredConfigPropertyMetaData rcpmd) {
089: requiredProperties.add(rcpmd);
090: }
091:
092: /**
093: * Get the required properties
094: *
095: * @return the required config properties
096: */
097: public Collection getRequiredConfigProperties() {
098: return requiredProperties;
099: }
100:
101: public String toString() {
102: StringBuffer buffer = new StringBuffer();
103: buffer.append("MessageListenerMetaData").append('@');
104: buffer.append(Integer
105: .toHexString(System.identityHashCode(this )));
106: buffer.append("[type=").append(type);
107: buffer.append(" activationSpecType=").append(asType);
108: buffer.append(" requiredProperties=")
109: .append(requiredProperties);
110: buffer.append(']');
111: return buffer.toString();
112: }
113: }
|