001/**
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one or more
004 * contributor license agreements.  See the NOTICE file distributed with
005 * this work for additional information regarding copyright ownership.
006 * The ASF licenses this file to You under the Apache License, Version 2.0
007 * (the "License"); you may not use this file except in compliance with
008 * the License.  You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.activemq.ra;
019
020import org.apache.activemq.RedeliveryPolicy;
021
022import javax.resource.spi.ResourceAdapter;
023import javax.resource.spi.ActivationSpec;
024import java.util.List;
025
026/**
027 * 
028 */
029public interface MessageActivationSpec extends ActivationSpec {
030    boolean isValidUseRAManagedTransaction(List<String> errorMessages);
031
032    boolean isValidNoLocal(List<String> errorMessages);
033
034    boolean isValidMessageSelector(List<String> errorMessages);
035
036    boolean isValidMaxSessions(List<String> errorMessages);
037
038    boolean isValidMaxMessagesPerSessions(List<String> errorMessages);
039
040    boolean isValidMaxMessagesPerBatch(List<String> errorMessages);
041
042    boolean isValidEnableBatch(List<String> errorMessages);
043
044    /**
045     * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
046     */
047    ResourceAdapter getResourceAdapter();
048
049    /**
050     * @return Returns the destinationType.
051     */
052    String getDestinationType();
053
054    String getPassword();
055
056    String getUserName();
057
058    /**
059     * @return Returns the messageSelector.
060     */
061    String getMessageSelector();
062
063    /**
064     * @return Returns the noLocal.
065     */
066    String getNoLocal();
067
068    String getAcknowledgeMode();
069
070    String getClientId();
071
072    String getDestination();
073
074    String getSubscriptionDurability();
075
076    String getSubscriptionName();
077
078    boolean isValidSubscriptionName(List<String> errorMessages);
079
080    boolean isValidClientId(List<String> errorMessages);
081
082    boolean isDurableSubscription();
083
084    boolean isValidSubscriptionDurability(List<String> errorMessages);
085
086    boolean isValidAcknowledgeMode(List<String> errorMessages);
087
088    boolean isValidDestinationType(List<String> errorMessages);
089
090    boolean isValidDestination(List<String> errorMessages);
091
092    boolean isEmpty(String value);
093
094    int getAcknowledgeModeForSession();
095
096    String getMaxMessagesPerSessions();
097
098    String getMaxSessions();
099
100    String getUseRAManagedTransaction();
101
102    int getMaxMessagesPerSessionsIntValue();
103
104    int getMaxSessionsIntValue();
105
106    boolean isUseRAManagedTransactionEnabled();
107
108    boolean getNoLocalBooleanValue();
109
110    String getEnableBatch();
111
112    boolean getEnableBatchBooleanValue();
113
114    int getMaxMessagesPerBatchIntValue();
115
116    String getMaxMessagesPerBatch();
117
118    double getBackOffMultiplier();
119    
120    long getMaximumRedeliveryDelay();
121
122    long getInitialRedeliveryDelay();
123
124    int getMaximumRedeliveries();
125
126    boolean isUseExponentialBackOff();
127
128    RedeliveryPolicy redeliveryPolicy();
129
130    RedeliveryPolicy lazyCreateRedeliveryPolicy();
131}