├── .gitignore
├── README.md
├── ivy.xml
├── src
└── main
│ └── com
│ └── zeroclue
│ └── jmeter
│ └── protocol
│ └── amqp
│ ├── gui
│ ├── AMQPConsumerGui.java
│ ├── AMQPPublisherGui.java
│ └── AMQPSamplerGui.java
│ ├── AMQPPublisher.java
│ ├── AMQPConsumer.java
│ └── AMQPSampler.java
├── examples
└── RPC_Load_Test.jmx
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | .settings/
4 | *\.sw[po]
5 | .DS_Store
6 | stats/
7 | target/
8 | gc.log
9 | lib/
10 | /nbproject/private/
11 | /build/
12 | /dist/
13 | /ivy/
14 | *.iml
15 | .idea
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JMeter-Rabbit-AMQP #
2 | ======================
3 |
4 | A [JMeter](http://jmeter.apache.org/) plugin to publish & consume messages from [RabbitMQ](http://www.rabbitmq.com/) or any [AMQP](http://www.amqp.org/) message broker.
5 |
6 |
7 | JMeter Runtime Dependencies
8 | ---------------------------
9 |
10 | Prior to building or installing this JMeter plugin, ensure that the RabbitMQ client library (amqp-client-3.x.x.jar) is installed in JMeter's lib/ directory.
11 |
12 |
13 | Build Dependencies
14 | ------------------
15 |
16 | Build dependencies are managed by Ivy. JARs should automagically be downloaded by Ivy as part of the build process.
17 |
18 | In addition, you'll need to copy or symlink the following from JMeter's lib/ext directory:
19 | * ApacheJMeter_core.jar
20 |
21 |
22 | Building
23 | --------
24 |
25 | The project is built using Ant. To execute the build script, just execute:
26 | ant
27 |
28 |
29 | Installing
30 | ----------
31 |
32 | To install the plugin, build the project and copy the generated JMeterAMQP.jar file from target/dist to JMeter's lib/ext/ directory.
33 |
--------------------------------------------------------------------------------
/ivy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/gui/AMQPConsumerGui.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp.gui;
2 |
3 | import com.zeroclue.jmeter.protocol.amqp.AMQPConsumer;
4 | import org.apache.jmeter.testelement.TestElement;
5 | import org.apache.jorphan.gui.JLabeledTextField;
6 |
7 | import javax.swing.*;
8 | import java.awt.*;
9 |
10 |
11 | public class AMQPConsumerGui extends AMQPSamplerGui {
12 |
13 | private static final long serialVersionUID = 1L;
14 |
15 | protected JLabeledTextField receiveTimeout = new JLabeledTextField("Receive Timeout");
16 | protected JLabeledTextField prefetchCount = new JLabeledTextField("Prefetch Count");
17 |
18 | private final JCheckBox purgeQueue = new JCheckBox("Purge Queue", false);
19 | private final JCheckBox autoAck = new JCheckBox("Auto ACK", true);
20 | private final JCheckBox readResponse = new JCheckBox("Read Response", AMQPConsumer.DEFAULT_READ_RESPONSE);
21 | private final JCheckBox useTx = new JCheckBox("Use Transactions?", AMQPConsumer.DEFAULT_USE_TX);
22 |
23 | private JPanel mainPanel;
24 |
25 | public AMQPConsumerGui(){
26 | init();
27 | }
28 |
29 | /*
30 | * Helper method to set up the GUI screen
31 | */
32 | protected void init() {
33 | super.init();
34 | prefetchCount.setPreferredSize(new Dimension(100,25));
35 | useTx.setPreferredSize(new Dimension(100,25));
36 |
37 | mainPanel.add(receiveTimeout);
38 | mainPanel.add(prefetchCount);
39 | mainPanel.add(purgeQueue);
40 | mainPanel.add(autoAck);
41 | mainPanel.add(readResponse);
42 | mainPanel.add(useTx);
43 | }
44 |
45 | @Override
46 | public String getStaticLabel() {
47 | return "AMQP Consumer";
48 | }
49 |
50 | /**
51 | * {@inheritDoc}
52 | */
53 | @Override
54 | public void configure(TestElement element) {
55 | super.configure(element);
56 | if (!(element instanceof AMQPConsumer)) return;
57 | AMQPConsumer sampler = (AMQPConsumer) element;
58 |
59 | readResponse.setSelected(sampler.getReadResponseAsBoolean());
60 | prefetchCount.setText(sampler.getPrefetchCount());
61 | receiveTimeout.setText(sampler.getReceiveTimeout());
62 | purgeQueue.setSelected(sampler.purgeQueue());
63 | autoAck.setSelected(sampler.autoAck());
64 | useTx.setSelected(sampler.getUseTx());
65 | }
66 |
67 | /**
68 | * {@inheritDoc}
69 | */
70 | @Override
71 | public void clearGui() {
72 | super.clearGui();
73 | readResponse.setSelected(AMQPConsumer.DEFAULT_READ_RESPONSE);
74 | prefetchCount.setText(AMQPConsumer.DEFAULT_PREFETCH_COUNT_STRING);
75 | receiveTimeout.setText("");
76 | purgeQueue.setSelected(false);
77 | autoAck.setSelected(true);
78 | useTx.setSelected(AMQPConsumer.DEFAULT_USE_TX);
79 | }
80 |
81 | /**
82 | * {@inheritDoc}
83 | */
84 | @Override
85 | public TestElement createTestElement() {
86 | AMQPConsumer sampler = new AMQPConsumer();
87 | modifyTestElement(sampler);
88 | return sampler;
89 | }
90 |
91 | /**
92 | * {@inheritDoc}
93 | */
94 | @Override
95 | public void modifyTestElement(TestElement te) {
96 | AMQPConsumer sampler = (AMQPConsumer) te;
97 | sampler.clear();
98 | configureTestElement(sampler);
99 |
100 | super.modifyTestElement(sampler);
101 |
102 | sampler.setReadResponse(readResponse.isSelected());
103 | sampler.setPrefetchCount(prefetchCount.getText());
104 |
105 | sampler.setReceiveTimeout(receiveTimeout.getText());
106 | sampler.setPurgeQueue(purgeQueue.isSelected());
107 | sampler.setAutoAck(autoAck.isSelected());
108 | sampler.setUseTx(useTx.isSelected());
109 | }
110 |
111 | /**
112 | * {@inheritDoc}
113 | */
114 | @Override
115 | public String getLabelResource() {
116 | return this.getClass().getSimpleName();
117 | }
118 |
119 | @Override
120 | protected void setMainPanel(JPanel panel) {
121 | mainPanel = panel;
122 | }
123 |
124 |
125 | }
126 |
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/gui/AMQPPublisherGui.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp.gui;
2 |
3 | import java.awt.Dimension;
4 |
5 | import javax.swing.*;
6 |
7 | import org.apache.jmeter.config.Arguments;
8 | import org.apache.jmeter.config.gui.ArgumentsPanel;
9 | import org.apache.jmeter.testelement.TestElement;
10 | import org.apache.jorphan.gui.JLabeledTextArea;
11 | import org.apache.jorphan.gui.JLabeledTextField;
12 |
13 | import com.zeroclue.jmeter.protocol.amqp.AMQPPublisher;
14 |
15 | /**
16 | * AMQP Sampler
17 | *
18 | * This class is responsible for ensuring that the Sampler data is kept in step
19 | * with the GUI.
20 | *
21 | * The GUI class is not invoked in non-GUI mode, so it should not perform any
22 | * additional setup that a test would need at run-time
23 | *
24 | */
25 | public class AMQPPublisherGui extends AMQPSamplerGui {
26 |
27 | private static final long serialVersionUID = 1L;
28 |
29 | private JPanel mainPanel;
30 |
31 | /*
32 | private static final String[] CONFIG_CHOICES = {"File", "Static"};
33 | private final JLabeledRadio configChoice = new JLabeledRadio("Message Source", CONFIG_CHOICES);
34 | private final FilePanel messageFile = new FilePanel("Filename", ALL_FILES);
35 | */
36 | private JLabeledTextArea message = new JLabeledTextArea("Message Content");
37 | private JLabeledTextField messageRoutingKey = new JLabeledTextField("Routing Key");
38 | private JLabeledTextField messageType = new JLabeledTextField("Message Type");
39 | private JLabeledTextField replyToQueue = new JLabeledTextField("Reply-To Queue");
40 | private JLabeledTextField correlationId = new JLabeledTextField("Correlation Id");
41 | private JLabeledTextField contentType = new JLabeledTextField("ContentType");
42 | private JLabeledTextField messageId = new JLabeledTextField("Message Id");
43 |
44 | private JCheckBox persistent = new JCheckBox("Persistent?", AMQPPublisher.DEFAULT_PERSISTENT);
45 | private JCheckBox useTx = new JCheckBox("Use Transactions?", AMQPPublisher.DEFAULT_USE_TX);
46 |
47 | private ArgumentsPanel headers = new ArgumentsPanel("Headers");
48 |
49 | public AMQPPublisherGui(){
50 | init();
51 | }
52 |
53 | /**
54 | * {@inheritDoc}
55 | */
56 | @Override
57 | public String getLabelResource() {
58 | return this.getClass().getSimpleName();
59 | }
60 |
61 | @Override
62 | public String getStaticLabel() {
63 | return "AMQP Publisher";
64 | }
65 |
66 | /**
67 | * {@inheritDoc}
68 | */
69 | @Override
70 | public void configure(TestElement element) {
71 | super.configure(element);
72 | if (!(element instanceof AMQPPublisher)) return;
73 | AMQPPublisher sampler = (AMQPPublisher) element;
74 |
75 | persistent.setSelected(sampler.getPersistent());
76 | useTx.setSelected(sampler.getUseTx());
77 |
78 | messageRoutingKey.setText(sampler.getMessageRoutingKey());
79 | messageType.setText(sampler.getMessageType());
80 | replyToQueue.setText(sampler.getReplyToQueue());
81 | contentType.setText(sampler.getContentType());
82 | correlationId.setText(sampler.getCorrelationId());
83 | messageId.setText(sampler.getMessageId());
84 | message.setText(sampler.getMessage());
85 | configureHeaders(sampler);
86 | }
87 |
88 | /**
89 | * {@inheritDoc}
90 | */
91 | @Override
92 | public TestElement createTestElement() {
93 | AMQPPublisher sampler = new AMQPPublisher();
94 | modifyTestElement(sampler);
95 | return sampler;
96 | }
97 |
98 | /**
99 | * {@inheritDoc}
100 | */
101 | @Override
102 | public void modifyTestElement(TestElement te) {
103 | AMQPPublisher sampler = (AMQPPublisher) te;
104 | sampler.clear();
105 | configureTestElement(sampler);
106 |
107 | super.modifyTestElement(sampler);
108 |
109 | sampler.setPersistent(persistent.isSelected());
110 | sampler.setUseTx(useTx.isSelected());
111 |
112 | sampler.setMessageRoutingKey(messageRoutingKey.getText());
113 | sampler.setMessage(message.getText());
114 | sampler.setMessageType(messageType.getText());
115 | sampler.setReplyToQueue(replyToQueue.getText());
116 | sampler.setCorrelationId(correlationId.getText());
117 | sampler.setContentType(contentType.getText());
118 | sampler.setMessageId(messageId.getText());
119 | sampler.setHeaders((Arguments) headers.createTestElement());
120 | }
121 |
122 | @Override
123 | protected void setMainPanel(JPanel panel){
124 | mainPanel = panel;
125 | }
126 |
127 | /*
128 | * Helper method to set up the GUI screen
129 | */
130 | @Override
131 | protected final void init() {
132 | super.init();
133 | persistent.setPreferredSize(new Dimension(100, 25));
134 | useTx.setPreferredSize(new Dimension(100, 25));
135 | messageRoutingKey.setPreferredSize(new Dimension(100, 25));
136 | messageType.setPreferredSize(new Dimension(100, 25));
137 | replyToQueue.setPreferredSize(new Dimension(100, 25));
138 | correlationId.setPreferredSize(new Dimension(100, 25));
139 | contentType.setPreferredSize(new Dimension(100, 25));
140 | messageId.setPreferredSize(new Dimension(100, 25));
141 | message.setPreferredSize(new Dimension(400, 150));
142 |
143 | mainPanel.add(persistent);
144 | mainPanel.add(useTx);
145 | mainPanel.add(messageRoutingKey);
146 | mainPanel.add(messageType);
147 | mainPanel.add(replyToQueue);
148 | mainPanel.add(correlationId);
149 | mainPanel.add(contentType);
150 | mainPanel.add(messageId);
151 | mainPanel.add(headers);
152 | mainPanel.add(message);
153 | }
154 |
155 | /**
156 | * {@inheritDoc}
157 | */
158 | @Override
159 | public void clearGui() {
160 | super.clearGui();
161 | persistent.setSelected(AMQPPublisher.DEFAULT_PERSISTENT);
162 | useTx.setSelected(AMQPPublisher.DEFAULT_USE_TX);
163 | messageRoutingKey.setText("");
164 | messageType.setText("");
165 | replyToQueue.setText("");
166 | correlationId.setText("");
167 | contentType.setText("");
168 | messageId.setText("");
169 | headers.clearGui();
170 | message.setText("");
171 | }
172 |
173 | private void configureHeaders(AMQPPublisher sampler)
174 | {
175 | Arguments sampleHeaders = sampler.getHeaders();
176 | if (sampleHeaders != null) {
177 | headers.configure(sampleHeaders);
178 | } else {
179 | headers.clearGui();
180 | }
181 | }
182 | }
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/AMQPPublisher.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp;
2 |
3 | import com.rabbitmq.client.AMQP;
4 | import com.rabbitmq.client.Channel;
5 | import org.apache.commons.lang3.StringUtils;
6 | import org.apache.jmeter.config.Arguments;
7 | import org.apache.jmeter.samplers.Entry;
8 | import org.apache.jmeter.samplers.Interruptible;
9 | import org.apache.jmeter.samplers.SampleResult;
10 | import org.apache.jmeter.testelement.property.TestElementProperty;
11 | import org.apache.jorphan.logging.LoggingManager;
12 | import org.apache.log.Logger;
13 |
14 | import java.io.IOException;
15 | import java.security.KeyManagementException;
16 | import java.security.NoSuchAlgorithmException;
17 | import java.util.HashMap;
18 | import java.util.Map;
19 |
20 | /**
21 | * JMeter creates an instance of a sampler class for every occurrence of the
22 | * element in every thread. [some additional copies may be created before the
23 | * test run starts]
24 | *
25 | * Thus each sampler is guaranteed to be called by a single thread - there is no
26 | * need to synchronize access to instance variables.
27 | *
28 | * However, access to class fields must be synchronized.
29 | */
30 | public class AMQPPublisher extends AMQPSampler implements Interruptible {
31 |
32 | private static final long serialVersionUID = -8420658040465788497L;
33 |
34 | private static final Logger log = LoggingManager.getLoggerForClass();
35 |
36 | //++ These are JMX names, and must not be changed
37 | private final static String MESSAGE = "AMQPPublisher.Message";
38 | private final static String MESSAGE_ROUTING_KEY = "AMQPPublisher.MessageRoutingKey";
39 | private final static String MESSAGE_TYPE = "AMQPPublisher.MessageType";
40 | private final static String REPLY_TO_QUEUE = "AMQPPublisher.ReplyToQueue";
41 | private final static String CONTENT_TYPE = "AMQPPublisher.ContentType";
42 | private final static String CORRELATION_ID = "AMQPPublisher.CorrelationId";
43 | private final static String MESSAGE_ID = "AMQPPublisher.MessageId";
44 | private final static String HEADERS = "AMQPPublisher.Headers";
45 |
46 | public static boolean DEFAULT_PERSISTENT = false;
47 | private final static String PERSISTENT = "AMQPPublisher.Persistent";
48 |
49 | public static boolean DEFAULT_USE_TX = false;
50 | private final static String USE_TX = "AMQPPublisher.UseTx";
51 |
52 | private transient Channel channel;
53 |
54 | public AMQPPublisher() {
55 | super();
56 | }
57 |
58 | /**
59 | * {@inheritDoc}
60 | */
61 | @Override
62 | public SampleResult sample(Entry e) {
63 | SampleResult result = new SampleResult();
64 | result.setSampleLabel(getName());
65 | result.setSuccessful(false);
66 | result.setResponseCode("500");
67 |
68 | try {
69 | initChannel();
70 | } catch (Exception ex) {
71 | log.error("Failed to initialize channel : ", ex);
72 | result.setResponseMessage(ex.toString());
73 | return result;
74 | }
75 |
76 | String data = getMessage(); // Sampler data
77 |
78 | result.setSampleLabel(getTitle());
79 | /*
80 | * Perform the sampling
81 | */
82 |
83 | // aggregate samples.
84 | int loop = getIterationsAsInt();
85 | result.sampleStart(); // Start timing
86 | try {
87 | AMQP.BasicProperties messageProperties = getProperties();
88 | byte[] messageBytes = getMessageBytes();
89 |
90 | for (int idx = 0; idx < loop; idx++) {
91 | // try to force jms semantics.
92 | // but this does not work since RabbitMQ does not sync to disk if consumers are connected as
93 | // seen by iostat -cd 1. TPS value remains at 0.
94 |
95 | channel.basicPublish(getExchange(), getMessageRoutingKey(), messageProperties, messageBytes);
96 |
97 | }
98 |
99 | // commit the sample.
100 | if (getUseTx()) {
101 | channel.txCommit();
102 | }
103 |
104 | /*
105 | * Set up the sample result details
106 | */
107 | result.setSamplerData(data);
108 | result.setResponseData(new String(messageBytes), null);
109 | result.setDataType(SampleResult.TEXT);
110 |
111 | result.setResponseCodeOK();
112 | result.setResponseMessage("OK");
113 | result.setSuccessful(true);
114 | } catch (Exception ex) {
115 | log.debug(ex.getMessage(), ex);
116 | result.setResponseCode("000");
117 | result.setResponseMessage(ex.toString());
118 | }
119 | finally {
120 | result.sampleEnd(); // End timimg
121 | }
122 |
123 | return result;
124 | }
125 |
126 |
127 | private byte[] getMessageBytes() {
128 | return getMessage().getBytes();
129 | }
130 |
131 | /**
132 | * @return the message routing key for the sample
133 | */
134 | public String getMessageRoutingKey() {
135 | return getPropertyAsString(MESSAGE_ROUTING_KEY);
136 | }
137 |
138 | public void setMessageRoutingKey(String content) {
139 | setProperty(MESSAGE_ROUTING_KEY, content);
140 | }
141 |
142 | /**
143 | * @return the message for the sample
144 | */
145 | public String getMessage() {
146 | return getPropertyAsString(MESSAGE);
147 | }
148 |
149 | public void setMessage(String content) {
150 | setProperty(MESSAGE, content);
151 | }
152 |
153 | /**
154 | * @return the message type for the sample
155 | */
156 | public String getMessageType() {
157 | return getPropertyAsString(MESSAGE_TYPE);
158 | }
159 |
160 | public void setMessageType(String content) {
161 | setProperty(MESSAGE_TYPE, content);
162 | }
163 |
164 | /**
165 | * @return the reply-to queue for the sample
166 | */
167 | public String getReplyToQueue() {
168 | return getPropertyAsString(REPLY_TO_QUEUE);
169 | }
170 |
171 | public void setReplyToQueue(String content) {
172 | setProperty(REPLY_TO_QUEUE, content);
173 | }
174 |
175 | public String getContentType() {
176 | return getPropertyAsString(CONTENT_TYPE);
177 | }
178 |
179 | public void setContentType(String contentType) {
180 | setProperty(CONTENT_TYPE, contentType);
181 | }
182 |
183 | /**
184 | * @return the correlation identifier for the sample
185 | */
186 | public String getCorrelationId() {
187 | return getPropertyAsString(CORRELATION_ID);
188 | }
189 |
190 | public void setCorrelationId(String content) {
191 | setProperty(CORRELATION_ID, content);
192 | }
193 |
194 | /**
195 | * @return the message id for the sample
196 | */
197 | public String getMessageId() {
198 | return getPropertyAsString(MESSAGE_ID);
199 | }
200 |
201 | public void setMessageId(String content) {
202 | setProperty(MESSAGE_ID, content);
203 | }
204 |
205 | public Arguments getHeaders() {
206 | return (Arguments) getProperty(HEADERS).getObjectValue();
207 | }
208 |
209 | public void setHeaders(Arguments headers) {
210 | setProperty(new TestElementProperty(HEADERS, headers));
211 | }
212 |
213 | public Boolean getPersistent() {
214 | return getPropertyAsBoolean(PERSISTENT, DEFAULT_PERSISTENT);
215 | }
216 |
217 | public void setPersistent(Boolean persistent) {
218 | setProperty(PERSISTENT, persistent);
219 | }
220 |
221 | public Boolean getUseTx() {
222 | return getPropertyAsBoolean(USE_TX, DEFAULT_USE_TX);
223 | }
224 |
225 | public void setUseTx(Boolean tx) {
226 | setProperty(USE_TX, tx);
227 | }
228 |
229 | @Override
230 | public boolean interrupt() {
231 | cleanup();
232 | return true;
233 | }
234 |
235 | @Override
236 | protected Channel getChannel() {
237 | return channel;
238 | }
239 |
240 | @Override
241 | protected void setChannel(Channel channel) {
242 | this.channel = channel;
243 | }
244 |
245 | protected AMQP.BasicProperties getProperties() {
246 | final AMQP.BasicProperties.Builder builder = new AMQP.BasicProperties.Builder();
247 |
248 | final int deliveryMode = getPersistent() ? 2 : 1;
249 | final String contentType = StringUtils.defaultIfEmpty(getContentType(), "text/plain");
250 |
251 | builder.contentType(contentType)
252 | .deliveryMode(deliveryMode)
253 | .priority(0)
254 | .correlationId(getCorrelationId())
255 | .replyTo(getReplyToQueue())
256 | .type(getMessageType())
257 | .headers(prepareHeaders())
258 | .build();
259 | if (getMessageId() != null && !getMessageId().isEmpty()) {
260 | builder.messageId(getMessageId());
261 | }
262 | return builder.build();
263 | }
264 |
265 | protected boolean initChannel() throws IOException, NoSuchAlgorithmException, KeyManagementException {
266 | boolean ret = super.initChannel();
267 | if (getUseTx()) {
268 | channel.txSelect();
269 | }
270 | return ret;
271 | }
272 |
273 | private Map prepareHeaders() {
274 | Map result = new HashMap();
275 | Map source = getHeaders().getArgumentsAsMap();
276 | for (Map.Entry item : source.entrySet()) {
277 | result.put(item.getKey(), item.getValue());
278 | }
279 | return result;
280 | }
281 | }
282 |
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/AMQPConsumer.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp;
2 |
3 | import com.rabbitmq.client.Channel;
4 | import com.rabbitmq.client.ConsumerCancelledException;
5 | import com.rabbitmq.client.QueueingConsumer;
6 | import com.rabbitmq.client.ShutdownSignalException;
7 | import org.apache.jmeter.samplers.Entry;
8 | import org.apache.jmeter.samplers.Interruptible;
9 | import org.apache.jmeter.samplers.SampleResult;
10 | import org.apache.jmeter.testelement.TestStateListener;
11 | import org.apache.jorphan.logging.LoggingManager;
12 | import org.apache.log.Logger;
13 |
14 | import java.io.IOException;
15 | import java.security.KeyManagementException;
16 | import java.security.NoSuchAlgorithmException;
17 | import java.util.Map;
18 |
19 | public class AMQPConsumer extends AMQPSampler implements Interruptible, TestStateListener {
20 | private static final int DEFAULT_PREFETCH_COUNT = 0; // unlimited
21 |
22 | public static final boolean DEFAULT_READ_RESPONSE = true;
23 | public static final String DEFAULT_PREFETCH_COUNT_STRING = Integer.toString(DEFAULT_PREFETCH_COUNT);
24 |
25 | private static final long serialVersionUID = 7480863561320459091L;
26 |
27 | private static final Logger log = LoggingManager.getLoggerForClass();
28 |
29 | //++ These are JMX names, and must not be changed
30 | private static final String PREFETCH_COUNT = "AMQPConsumer.PrefetchCount";
31 | private static final String READ_RESPONSE = "AMQPConsumer.ReadResponse";
32 | private static final String PURGE_QUEUE = "AMQPConsumer.PurgeQueue";
33 | private static final String AUTO_ACK = "AMQPConsumer.AutoAck";
34 | private static final String RECEIVE_TIMEOUT = "AMQPConsumer.ReceiveTimeout";
35 | public static final String TIMESTAMP_PARAMETER = "Timestamp";
36 | public static final String EXCHANGE_PARAMETER = "Exchange";
37 | public static final String ROUTING_KEY_PARAMETER = "Routing Key";
38 | public static final String DELIVERY_TAG_PARAMETER = "Delivery Tag";
39 |
40 | public static boolean DEFAULT_USE_TX = false;
41 | private final static String USE_TX = "AMQPConsumer.UseTx";
42 |
43 | private transient Channel channel;
44 | private transient QueueingConsumer consumer;
45 | private transient String consumerTag;
46 |
47 | public AMQPConsumer(){
48 | super();
49 | }
50 |
51 | /**
52 | * {@inheritDoc}
53 | */
54 | @Override
55 | public SampleResult sample(Entry entry) {
56 | SampleResult result = new SampleResult();
57 | result.setSampleLabel(getName());
58 | result.setSuccessful(false);
59 | result.setResponseCode("500");
60 |
61 | trace("AMQPConsumer.sample()");
62 |
63 | try {
64 | initChannel();
65 |
66 | // only do this once per thread. Otherwise it slows down the consumption by appx 50%
67 | if (consumer == null) {
68 | log.info("Creating consumer");
69 | consumer = new QueueingConsumer(channel);
70 | }
71 | if (consumerTag == null) {
72 | log.info("Starting basic consumer");
73 | consumerTag = channel.basicConsume(getQueue(), autoAck(), consumer);
74 | }
75 | } catch (Exception ex) {
76 | log.error("Failed to initialize channel", ex);
77 | result.setResponseMessage(ex.toString());
78 | return result;
79 | }
80 |
81 | result.setSampleLabel(getTitle());
82 | /*
83 | * Perform the sampling
84 | */
85 |
86 | // aggregate samples.
87 | int loop = getIterationsAsInt();
88 | result.sampleStart(); // Start timing
89 | QueueingConsumer.Delivery delivery = null;
90 | try {
91 | for (int idx = 0; idx < loop; idx++) {
92 | delivery = consumer.nextDelivery(getReceiveTimeoutAsInt());
93 |
94 | if(delivery == null){
95 | result.setResponseMessage("timed out");
96 | return result;
97 | }
98 |
99 | /*
100 | * Set up the sample result details
101 | */
102 | if (getReadResponseAsBoolean()) {
103 | String response = new String(delivery.getBody());
104 | result.setSamplerData(response);
105 | result.setResponseMessage(response);
106 | }
107 | else {
108 | result.setSamplerData("Read response is false.");
109 | }
110 |
111 | if(!autoAck())
112 | channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
113 | }
114 |
115 | // commit the sample.
116 | if (getUseTx()) {
117 | channel.txCommit();
118 | }
119 |
120 | result.setResponseData("OK", null);
121 | result.setDataType(SampleResult.TEXT);
122 | result.setResponseHeaders(delivery != null ? formatHeaders(delivery) : null);
123 |
124 |
125 | result.setResponseCodeOK();
126 |
127 | result.setSuccessful(true);
128 |
129 | } catch (ShutdownSignalException e) {
130 | consumer = null;
131 | consumerTag = null;
132 | log.warn("AMQP consumer failed to consume", e);
133 | result.setResponseCode("400");
134 | result.setResponseMessage(e.getMessage());
135 | interrupt();
136 | } catch (ConsumerCancelledException e) {
137 | consumer = null;
138 | consumerTag = null;
139 | log.warn("AMQP consumer failed to consume", e);
140 | result.setResponseCode("300");
141 | result.setResponseMessage(e.getMessage());
142 | interrupt();
143 | } catch (InterruptedException e) {
144 | consumer = null;
145 | consumerTag = null;
146 | log.info("interuppted while attempting to consume");
147 | result.setResponseCode("200");
148 | result.setResponseMessage(e.getMessage());
149 | } catch (IOException e) {
150 | consumer = null;
151 | consumerTag = null;
152 | log.warn("AMQP consumer failed to consume", e);
153 | result.setResponseCode("100");
154 | result.setResponseMessage(e.getMessage());
155 | } finally {
156 | result.sampleEnd(); // End timimg
157 | }
158 |
159 | trace("AMQPConsumer.sample ended");
160 |
161 | return result;
162 | }
163 |
164 | @Override
165 | protected Channel getChannel() {
166 | return channel;
167 | }
168 |
169 | @Override
170 | protected void setChannel(Channel channel) {
171 | this.channel = channel;
172 | }
173 |
174 | /**
175 | * @return the whether or not to purge the queue
176 | */
177 | public String getPurgeQueue() {
178 | return getPropertyAsString(PURGE_QUEUE);
179 | }
180 |
181 | public void setPurgeQueue(String content) {
182 | setProperty(PURGE_QUEUE, content);
183 | }
184 |
185 | public void setPurgeQueue(Boolean purgeQueue) {
186 | setProperty(PURGE_QUEUE, purgeQueue.toString());
187 | }
188 |
189 | public boolean purgeQueue(){
190 | return Boolean.parseBoolean(getPurgeQueue());
191 | }
192 |
193 | /**
194 | * @return the whether or not to auto ack
195 | */
196 | public String getAutoAck() {
197 | return getPropertyAsString(AUTO_ACK);
198 | }
199 |
200 | public void setAutoAck(String content) {
201 | setProperty(AUTO_ACK, content);
202 | }
203 |
204 | public void setAutoAck(Boolean autoAck) {
205 | setProperty(AUTO_ACK, autoAck.toString());
206 | }
207 |
208 | public boolean autoAck(){
209 | return getPropertyAsBoolean(AUTO_ACK);
210 | }
211 |
212 | protected int getReceiveTimeoutAsInt() {
213 | if (getPropertyAsInt(RECEIVE_TIMEOUT) < 1) {
214 | return DEFAULT_TIMEOUT;
215 | }
216 | return getPropertyAsInt(RECEIVE_TIMEOUT);
217 | }
218 |
219 | public String getReceiveTimeout() {
220 | return getPropertyAsString(RECEIVE_TIMEOUT, DEFAULT_TIMEOUT_STRING);
221 | }
222 |
223 |
224 | public void setReceiveTimeout(String s) {
225 | setProperty(RECEIVE_TIMEOUT, s);
226 | }
227 |
228 | public String getPrefetchCount() {
229 | return getPropertyAsString(PREFETCH_COUNT, DEFAULT_PREFETCH_COUNT_STRING);
230 | }
231 |
232 | public void setPrefetchCount(String prefetchCount) {
233 | setProperty(PREFETCH_COUNT, prefetchCount);
234 | }
235 |
236 | public int getPrefetchCountAsInt() {
237 | return getPropertyAsInt(PREFETCH_COUNT);
238 | }
239 |
240 | public Boolean getUseTx() {
241 | return getPropertyAsBoolean(USE_TX, DEFAULT_USE_TX);
242 | }
243 |
244 | public void setUseTx(Boolean tx) {
245 | setProperty(USE_TX, tx);
246 | }
247 |
248 | /**
249 | * set whether the sampler should read the response or not
250 | *
251 | * @param read whether the sampler should read the response or not
252 | */
253 | public void setReadResponse(Boolean read) {
254 | setProperty(READ_RESPONSE, read);
255 | }
256 |
257 | /**
258 | * return whether the sampler should read the response
259 | *
260 | * @return whether the sampler should read the response
261 | */
262 | public String getReadResponse() {
263 | return getPropertyAsString(READ_RESPONSE);
264 | }
265 |
266 | /**
267 | * return whether the sampler should read the response as a boolean value
268 | *
269 | * @return whether the sampler should read the response as a boolean value
270 | */
271 | public boolean getReadResponseAsBoolean() {
272 | return getPropertyAsBoolean(READ_RESPONSE);
273 | }
274 |
275 |
276 |
277 | @Override
278 | public boolean interrupt() {
279 | testEnded();
280 | return true;
281 | }
282 |
283 | /**
284 | * {@inheritDoc}
285 | */
286 | @Override
287 | public void testEnded() {
288 |
289 | if(purgeQueue()){
290 | log.info("Purging queue " + getQueue());
291 | try {
292 | channel.queuePurge(getQueue());
293 | } catch (IOException e) {
294 | log.error("Failed to purge queue " + getQueue(), e);
295 | }
296 | }
297 | }
298 |
299 | @Override
300 | public void testEnded(String arg0) {
301 |
302 | }
303 |
304 | @Override
305 | public void testStarted() {
306 |
307 | }
308 |
309 | @Override
310 | public void testStarted(String arg0) {
311 |
312 | }
313 |
314 | public void cleanup() {
315 |
316 | try {
317 | if (consumerTag != null) {
318 | channel.basicCancel(consumerTag);
319 | }
320 | } catch(IOException e) {
321 | log.error("Couldn't safely cancel the sample " + consumerTag, e);
322 | }
323 |
324 | super.cleanup();
325 |
326 | }
327 |
328 | /*
329 | * Helper method
330 | */
331 | private void trace(String s) {
332 | String tl = getTitle();
333 | String tn = Thread.currentThread().getName();
334 | String th = this.toString();
335 | log.debug(tn + " " + tl + " " + s + " " + th);
336 | }
337 |
338 | protected boolean initChannel() throws IOException, NoSuchAlgorithmException, KeyManagementException {
339 | boolean ret = super.initChannel();
340 | channel.basicQos(getPrefetchCountAsInt());
341 | if (getUseTx()) {
342 | channel.txSelect();
343 | }
344 | return ret;
345 | }
346 |
347 | private String formatHeaders(QueueingConsumer.Delivery delivery){
348 | Map headers = delivery.getProperties().getHeaders();
349 | StringBuilder sb = new StringBuilder();
350 | sb.append(TIMESTAMP_PARAMETER).append(": ")
351 | .append(delivery.getProperties().getTimestamp() != null && delivery.getProperties().getTimestamp() != null ?
352 | delivery.getProperties().getTimestamp().getTime() : "")
353 | .append("\n");
354 | sb.append(EXCHANGE_PARAMETER).append(": ").append(delivery.getEnvelope().getExchange()).append("\n");
355 | sb.append(ROUTING_KEY_PARAMETER).append(": ").append(delivery.getEnvelope().getRoutingKey()).append("\n");
356 | sb.append(DELIVERY_TAG_PARAMETER).append(": ").append(delivery.getEnvelope().getDeliveryTag()).append("\n");
357 | for (String key : headers.keySet()) {
358 | sb.append(key).append(": ").append(headers.get(key)).append("\n");
359 | }
360 | return sb.toString();
361 | }
362 | }
363 |
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/gui/AMQPSamplerGui.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp.gui;
2 |
3 | import com.zeroclue.jmeter.protocol.amqp.AMQPSampler;
4 | import org.apache.jmeter.gui.util.VerticalPanel;
5 | import org.apache.jmeter.samplers.gui.AbstractSamplerGui;
6 | import org.apache.jmeter.testelement.TestElement;
7 | import org.apache.jorphan.gui.JLabeledChoice;
8 | import org.apache.jorphan.gui.JLabeledTextField;
9 | import org.apache.jorphan.logging.LoggingManager;
10 | import org.apache.log.Logger;
11 |
12 | import javax.swing.*;
13 | import java.awt.*;
14 |
15 | public abstract class AMQPSamplerGui extends AbstractSamplerGui {
16 |
17 | private static final long serialVersionUID = 1L;
18 |
19 | private static final Logger log = LoggingManager.getLoggerForClass();
20 |
21 | protected JLabeledTextField exchange = new JLabeledTextField("Exchange");
22 | private final JCheckBox exchangeRedeclare = new JCheckBox("Redeclare?", AMQPSampler.DEFAULT_EXCHANGE_REDECLARE);
23 | protected JLabeledTextField queue = new JLabeledTextField("Queue");
24 | protected JLabeledTextField routingKey = new JLabeledTextField("Routing Key");
25 | protected JLabeledTextField virtualHost = new JLabeledTextField("Virtual Host");
26 | protected JLabeledTextField messageTTL = new JLabeledTextField("Message TTL");
27 | protected JLabeledTextField messageExpires = new JLabeledTextField("Expires");
28 | protected JLabeledChoice exchangeType = new JLabeledChoice("Exchange Type", new String[]{ "direct", "topic", "headers", "fanout"});
29 | private final JCheckBox exchangeDurable = new JCheckBox("Durable?", AMQPSampler.DEFAULT_EXCHANGE_DURABLE);
30 | private final JCheckBox exchangeAutoDelete = new JCheckBox("Auto Delete?", AMQPSampler.DEFAULT_EXCHANGE_AUTO_DELETE);
31 | private final JCheckBox queueDurable = new JCheckBox("Durable?", true);
32 | private final JCheckBox queueRedeclare = new JCheckBox("Redeclare?", AMQPSampler.DEFAULT_QUEUE_REDECLARE);
33 | private final JCheckBox queueExclusive = new JCheckBox("Exclusive", true);
34 | private final JCheckBox queueAutoDelete = new JCheckBox("Auto Delete?", true);
35 |
36 | protected JLabeledTextField host = new JLabeledTextField("Host");
37 | protected JLabeledTextField port = new JLabeledTextField("Port");
38 | protected JLabeledTextField timeout = new JLabeledTextField("Timeout");
39 | protected JLabeledTextField username = new JLabeledTextField("Username");
40 | protected JLabeledTextField password = new JLabeledTextField("Password");
41 | private final JCheckBox SSL = new JCheckBox("SSL?", false);
42 |
43 | private final JLabeledTextField iterations = new JLabeledTextField("Number of samples to Aggregate");
44 |
45 |
46 |
47 | protected abstract void setMainPanel(JPanel panel);
48 |
49 | /**
50 | * {@inheritDoc}
51 | */
52 | @Override
53 | public void configure(TestElement element) {
54 | super.configure(element);
55 | if (!(element instanceof AMQPSampler)) return;
56 | AMQPSampler sampler = (AMQPSampler) element;
57 |
58 | exchange.setText(sampler.getExchange());
59 | exchangeType.setText(sampler.getExchangeType());
60 | exchangeDurable.setSelected(sampler.getExchangeDurable());
61 | exchangeAutoDelete.setSelected(sampler.getExchangeAutoDelete());
62 | exchangeRedeclare.setSelected(sampler.getExchangeRedeclare());
63 | queue.setText(sampler.getQueue());
64 | routingKey.setText(sampler.getRoutingKey());
65 | virtualHost.setText(sampler.getVirtualHost());
66 | messageTTL.setText(sampler.getMessageTTL());
67 | messageExpires.setText(sampler.getMessageExpires());
68 | queueDurable.setSelected(sampler.queueDurable());
69 | queueExclusive.setSelected(sampler.queueExclusive());
70 | queueAutoDelete.setSelected(sampler.queueAutoDelete());
71 | queueRedeclare.setSelected(sampler.getQueueRedeclare());
72 |
73 | timeout.setText(sampler.getTimeout());
74 | iterations.setText(sampler.getIterations());
75 |
76 | host.setText(sampler.getHost());
77 | port.setText(sampler.getPort());
78 | username.setText(sampler.getUsername());
79 | password.setText(sampler.getPassword());
80 | SSL.setSelected(sampler.connectionSSL());
81 | log.info("AMQPSamplerGui.configure() called");
82 | }
83 |
84 | /**
85 | * {@inheritDoc}
86 | */
87 | @Override
88 | public void clearGui() {
89 | exchange.setText("jmeterExchange");
90 | queue.setText("jmeterQueue");
91 | exchangeDurable.setSelected(AMQPSampler.DEFAULT_EXCHANGE_DURABLE);
92 | exchangeAutoDelete.setSelected(AMQPSampler.DEFAULT_EXCHANGE_AUTO_DELETE);
93 | exchangeRedeclare.setSelected(AMQPSampler.DEFAULT_EXCHANGE_REDECLARE);
94 | routingKey.setText("jmeterRoutingKey");
95 | virtualHost.setText("/");
96 | messageTTL.setText("");
97 | messageExpires.setText("");
98 | exchangeType.setText("direct");
99 | queueDurable.setSelected(true);
100 | queueExclusive.setSelected(false);
101 | queueAutoDelete.setSelected(false);
102 | queueRedeclare.setSelected(AMQPSampler.DEFAULT_QUEUE_REDECLARE);
103 |
104 |
105 | timeout.setText(AMQPSampler.DEFAULT_TIMEOUT_STRING);
106 | iterations.setText(AMQPSampler.DEFAULT_ITERATIONS_STRING);
107 |
108 | host.setText("localhost");
109 | port.setText(AMQPSampler.DEFAULT_PORT_STRING);
110 | username.setText("guest");
111 | password.setText("guest");
112 | SSL.setSelected(false);
113 | }
114 |
115 | /**
116 | * {@inheritDoc}
117 | */
118 | @Override
119 | public void modifyTestElement(TestElement element) {
120 | AMQPSampler sampler = (AMQPSampler) element;
121 | sampler.clear();
122 | configureTestElement(sampler);
123 |
124 | sampler.setExchange(exchange.getText());
125 | sampler.setExchangeDurable(exchangeDurable.isSelected());
126 | sampler.setExchangeAutoDelete(exchangeAutoDelete.isSelected());
127 | sampler.setExchangeRedeclare(exchangeRedeclare.isSelected());
128 | sampler.setQueue(queue.getText());
129 | sampler.setRoutingKey(routingKey.getText());
130 | sampler.setVirtualHost(virtualHost.getText());
131 | sampler.setMessageTTL(messageTTL.getText());
132 | sampler.setMessageExpires(messageExpires.getText());
133 | sampler.setExchangeType(exchangeType.getText());
134 | sampler.setQueueDurable(queueDurable.isSelected());
135 | sampler.setQueueExclusive(queueExclusive.isSelected());
136 | sampler.setQueueAutoDelete(queueAutoDelete.isSelected());
137 | sampler.setQueueRedeclare(queueRedeclare.isSelected());
138 |
139 | sampler.setTimeout(timeout.getText());
140 | sampler.setIterations(iterations.getText());
141 |
142 | sampler.setHost(host.getText());
143 | sampler.setPort(port.getText());
144 | sampler.setUsername(username.getText());
145 | sampler.setPassword(password.getText());
146 | sampler.setConnectionSSL(SSL.isSelected());
147 | log.info("AMQPSamplerGui.modifyTestElement() called, set user/pass to " + username.getText() + "/" + password.getText() + " on sampler " + sampler);
148 | }
149 |
150 | protected void init() {
151 | setLayout(new BorderLayout(0, 5));
152 | setBorder(makeBorder());
153 | add(makeTitlePanel(), BorderLayout.NORTH); // Add the standard title
154 |
155 | JPanel mainPanel = new VerticalPanel();
156 |
157 | mainPanel.add(makeCommonPanel());
158 |
159 | iterations.setPreferredSize(new Dimension(50,25));
160 | mainPanel.add(iterations);
161 |
162 | add(mainPanel);
163 |
164 | setMainPanel(mainPanel);
165 | }
166 |
167 | private Component makeCommonPanel() {
168 | GridBagConstraints gridBagConstraints, gridBagConstraintsCommon;
169 |
170 | gridBagConstraintsCommon = new GridBagConstraints();
171 | gridBagConstraintsCommon.fill = GridBagConstraints.HORIZONTAL;
172 | gridBagConstraintsCommon.anchor = GridBagConstraints.WEST;
173 | gridBagConstraintsCommon.weightx = 0.5;
174 |
175 | gridBagConstraints = new GridBagConstraints();
176 | gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
177 | gridBagConstraints.fill = GridBagConstraints.NONE;
178 | gridBagConstraints.anchor = GridBagConstraints.WEST;
179 | gridBagConstraints.weightx = 0.5;
180 |
181 | JPanel commonPanel = new JPanel(new GridBagLayout());
182 |
183 | JPanel exchangeSettings = new JPanel(new GridBagLayout());
184 | exchangeSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Exchange"));
185 | gridBagConstraints.gridx = 0;
186 | gridBagConstraints.gridy = 0;
187 | exchangeSettings.add(exchange, gridBagConstraints);
188 |
189 | gridBagConstraints.gridx = 1;
190 | gridBagConstraints.gridy = 0;
191 | exchangeSettings.add(exchangeType, gridBagConstraints);
192 |
193 | gridBagConstraints.gridx = 0;
194 | gridBagConstraints.gridy = 1;
195 | exchangeSettings.add(exchangeDurable, gridBagConstraints);
196 |
197 | gridBagConstraints.gridx = 0;
198 | gridBagConstraints.gridy = 2;
199 | exchangeSettings.add(exchangeAutoDelete, gridBagConstraints);
200 |
201 | gridBagConstraints.gridx = 1;
202 | gridBagConstraints.gridy = 1;
203 | exchangeSettings.add(exchangeRedeclare, gridBagConstraints);
204 |
205 | JPanel queueSettings = new JPanel(new GridBagLayout());
206 | queueSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Queue"));
207 |
208 |
209 | gridBagConstraints.gridx = 0;
210 | gridBagConstraints.gridy = 0;
211 | queueSettings.add(queue, gridBagConstraints);
212 |
213 | gridBagConstraints.gridx = 0;
214 | gridBagConstraints.gridy = 1;
215 | queueSettings.add(routingKey, gridBagConstraints);
216 |
217 | gridBagConstraints.gridx = 0;
218 | gridBagConstraints.gridy = 2;
219 | queueSettings.add(messageTTL, gridBagConstraints);
220 |
221 | gridBagConstraints.gridx = 0;
222 | gridBagConstraints.gridy = 3;
223 | queueSettings.add(messageExpires, gridBagConstraints);
224 |
225 | gridBagConstraints.gridx = 1;
226 | gridBagConstraints.gridy = 1;
227 | queueSettings.add(queueDurable, gridBagConstraints);
228 |
229 | gridBagConstraints.gridx = 1;
230 | gridBagConstraints.gridy = 2;
231 | queueSettings.add(queueExclusive, gridBagConstraints);
232 |
233 | gridBagConstraints.gridx = 1;
234 | gridBagConstraints.gridy = 3;
235 | queueSettings.add(queueAutoDelete, gridBagConstraints);
236 |
237 | gridBagConstraints.gridx = 2;
238 | gridBagConstraints.gridy = 1;
239 | queueSettings.add(queueRedeclare, gridBagConstraints);
240 |
241 | gridBagConstraintsCommon.gridx = 0;
242 | gridBagConstraintsCommon.gridy = 0;
243 |
244 | JPanel exchangeQueueSettings = new VerticalPanel();
245 | exchangeQueueSettings.add(exchangeSettings);
246 | exchangeQueueSettings.add(queueSettings);
247 |
248 | commonPanel.add(exchangeQueueSettings, gridBagConstraintsCommon);
249 |
250 |
251 | JPanel serverSettings = new JPanel(new GridBagLayout());
252 | serverSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Connection"));
253 |
254 | gridBagConstraints.gridx = 0;
255 | gridBagConstraints.gridy = 0;
256 | serverSettings.add(virtualHost, gridBagConstraints);
257 |
258 | gridBagConstraints.gridx = 0;
259 | gridBagConstraints.gridy = 1;
260 | serverSettings.add(host, gridBagConstraints);
261 |
262 | gridBagConstraints.gridx = 0;
263 | gridBagConstraints.gridy = 2;
264 | serverSettings.add(port, gridBagConstraints);
265 |
266 | gridBagConstraints.gridx = 1;
267 | gridBagConstraints.gridy = 2;
268 | serverSettings.add(SSL, gridBagConstraints);
269 |
270 | gridBagConstraints.gridx = 0;
271 | gridBagConstraints.gridy = 3;
272 | serverSettings.add(username, gridBagConstraints);
273 |
274 | gridBagConstraints.gridx = 0;
275 | gridBagConstraints.gridy = 4;
276 | serverSettings.add(password, gridBagConstraints);
277 |
278 | gridBagConstraints.gridx = 0;
279 | gridBagConstraints.gridy = 5;
280 | serverSettings.add(timeout, gridBagConstraints);
281 |
282 | gridBagConstraintsCommon.gridx = 1;
283 | gridBagConstraintsCommon.gridy = 0;
284 |
285 | commonPanel.add(serverSettings, gridBagConstraintsCommon);
286 |
287 | return commonPanel;
288 | }
289 |
290 | }
291 |
--------------------------------------------------------------------------------
/examples/RPC_Load_Test.jmx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | false
7 | false
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | stoptest
16 |
17 | false
18 | 125
19 |
20 | 8
21 | 15
22 | 1361373100000
23 | 1361373100000
24 | false
25 |
26 |
27 |
28 |
29 |
30 | 999999999
31 | 1
32 | 000000000
33 | false
34 |
35 | replyToQueue
36 |
37 |
38 |
39 | uniqueId
40 | 0000000
41 | 1
42 | 9999999
43 | 3499272
44 | false
45 |
46 |
47 |
48 | true
49 | false
50 |
51 |
52 |
53 | my_rpc_exchange
54 | false
55 | false
56 | RPCRequestQueue
57 | RPCMessage.Request.v1_0
58 | /
59 |
60 |
61 | direct
62 | true
63 | false
64 | false
65 | false
66 | 1000
67 | 1
68 | localhost
69 | 5672
70 | guest
71 | guest
72 | false
73 | false
74 | false
75 | RPCMessage.Request.v1_0
76 | {
77 | "RequestMessageText": '${uniqueId}'
78 | }
79 | RPCMessageRequest
80 | jMeter_${__threadNum}_${replyToQueue}
81 | ${uniqueId}
82 |
83 |
84 |
85 |
86 |
87 |
88 | my_rpc_exchange
89 | false
90 | false
91 | jMeter_${__threadNum}_${replyToQueue}
92 | RPCMessage.Request.v1_0
93 | /
94 |
95 |
96 | direct
97 | false
98 | true
99 | true
100 | false
101 | 1000
102 | 1
103 | localhost
104 | 5672
105 | guest
106 | guest
107 | false
108 | false
109 | 0
110 | 10000
111 | false
112 | true
113 |
114 |
115 |
116 |
117 | false
118 |
119 | saveConfig
120 |
121 |
122 | true
123 | true
124 | true
125 |
126 | true
127 | true
128 | true
129 | true
130 | false
131 | true
132 | true
133 | false
134 | false
135 | false
136 | false
137 | false
138 | false
139 | false
140 | false
141 | 0
142 | true
143 |
144 |
145 |
146 |
147 |
148 |
149 | false
150 |
151 | saveConfig
152 |
153 |
154 | true
155 | true
156 | true
157 |
158 | true
159 | true
160 | true
161 | true
162 | false
163 | true
164 | true
165 | false
166 | false
167 | false
168 | false
169 | false
170 | false
171 | false
172 | false
173 | 0
174 | true
175 |
176 |
177 |
178 |
179 |
180 |
181 | false
182 |
183 | saveConfig
184 |
185 |
186 | true
187 | true
188 | true
189 |
190 | true
191 | true
192 | true
193 | true
194 | false
195 | true
196 | true
197 | false
198 | false
199 | false
200 | false
201 | false
202 | false
203 | false
204 | false
205 | 0
206 | true
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/src/main/com/zeroclue/jmeter/protocol/amqp/AMQPSampler.java:
--------------------------------------------------------------------------------
1 | package com.zeroclue.jmeter.protocol.amqp;
2 |
3 | import com.rabbitmq.client.*;
4 | import org.apache.commons.lang3.StringUtils;
5 | import org.apache.jmeter.samplers.AbstractSampler;
6 | import org.apache.jmeter.testelement.ThreadListener;
7 | import org.apache.jorphan.logging.LoggingManager;
8 | import org.apache.log.Logger;
9 |
10 | import java.io.IOException;
11 | import java.security.KeyManagementException;
12 | import java.security.NoSuchAlgorithmException;
13 | import java.util.Arrays;
14 | import java.util.Collections;
15 | import java.util.HashMap;
16 | import java.util.Map;
17 |
18 | public abstract class AMQPSampler extends AbstractSampler implements ThreadListener {
19 |
20 | public static final boolean DEFAULT_EXCHANGE_DURABLE = true;
21 | public static final boolean DEFAULT_EXCHANGE_AUTO_DELETE = true;
22 | public static final boolean DEFAULT_EXCHANGE_REDECLARE = false;
23 | public static final boolean DEFAULT_QUEUE_REDECLARE = false;
24 |
25 | public static final int DEFAULT_PORT = 5672;
26 | public static final String DEFAULT_PORT_STRING = Integer.toString(DEFAULT_PORT);
27 |
28 | public static final int DEFAULT_TIMEOUT = 1000;
29 | public static final String DEFAULT_TIMEOUT_STRING = Integer.toString(DEFAULT_TIMEOUT);
30 |
31 | public static final int DEFAULT_ITERATIONS = 1;
32 | public static final String DEFAULT_ITERATIONS_STRING = Integer.toString(DEFAULT_ITERATIONS);
33 |
34 | private static final Logger log = LoggingManager.getLoggerForClass();
35 |
36 |
37 | //++ These are JMX names, and must not be changed
38 | protected static final String EXCHANGE = "AMQPSampler.Exchange";
39 | protected static final String EXCHANGE_TYPE = "AMQPSampler.ExchangeType";
40 | protected static final String EXCHANGE_DURABLE = "AMQPSampler.ExchangeDurable";
41 | protected static final String EXCHANGE_AUTO_DELETE = "AMQPSampler.ExchangeAutoDelete";
42 | protected static final String EXCHANGE_REDECLARE = "AMQPSampler.ExchangeRedeclare";
43 | protected static final String QUEUE = "AMQPSampler.Queue";
44 | protected static final String ROUTING_KEY = "AMQPSampler.RoutingKey";
45 | protected static final String VIRUTAL_HOST = "AMQPSampler.VirtualHost";
46 | protected static final String HOST = "AMQPSampler.Host";
47 | protected static final String PORT = "AMQPSampler.Port";
48 | protected static final String SSL = "AMQPSampler.SSL";
49 | protected static final String USERNAME = "AMQPSampler.Username";
50 | protected static final String PASSWORD = "AMQPSampler.Password";
51 | private static final String TIMEOUT = "AMQPSampler.Timeout";
52 | private static final String ITERATIONS = "AMQPSampler.Iterations";
53 | private static final String MESSAGE_TTL = "AMQPSampler.MessageTTL";
54 | private static final String MESSAGE_EXPIRES = "AMQPSampler.MessageExpires";
55 | private static final String QUEUE_DURABLE = "AMQPSampler.QueueDurable";
56 | private static final String QUEUE_REDECLARE = "AMQPSampler.Redeclare";
57 | private static final String QUEUE_EXCLUSIVE = "AMQPSampler.QueueExclusive";
58 | private static final String QUEUE_AUTO_DELETE = "AMQPSampler.QueueAutoDelete";
59 | private static final int DEFAULT_HEARTBEAT = 1;
60 |
61 | private transient ConnectionFactory factory;
62 | private transient Connection connection;
63 |
64 | protected AMQPSampler(){
65 | factory = new ConnectionFactory();
66 | factory.setRequestedHeartbeat(DEFAULT_HEARTBEAT);
67 | }
68 |
69 | protected boolean initChannel() throws IOException, NoSuchAlgorithmException, KeyManagementException {
70 | Channel channel = getChannel();
71 |
72 | if(channel != null && !channel.isOpen()){
73 | log.warn("channel " + channel.getChannelNumber()
74 | + " closed unexpectedly: ", channel.getCloseReason());
75 | channel = null; // so we re-open it below
76 | }
77 |
78 | if(channel == null) {
79 | channel = createChannel();
80 | setChannel(channel);
81 |
82 | //TODO: Break out queue binding
83 | boolean queueConfigured = (getQueue() != null && !getQueue().isEmpty());
84 |
85 | if(queueConfigured) {
86 | if (getQueueRedeclare()) {
87 | deleteQueue();
88 | }
89 |
90 | AMQP.Queue.DeclareOk declareQueueResp = channel.queueDeclare(getQueue(), queueDurable(), queueExclusive(), queueAutoDelete(), getQueueArguments());
91 | }
92 |
93 | if(!StringUtils.isBlank(getExchange())) { //Use a named exchange
94 | if (getExchangeRedeclare()) {
95 | deleteExchange();
96 | }
97 |
98 | AMQP.Exchange.DeclareOk declareExchangeResp = channel.exchangeDeclare(getExchange(), getExchangeType(), getExchangeDurable(), getExchangeAutoDelete(), Collections.emptyMap());
99 | if (queueConfigured) {
100 | channel.queueBind(getQueue(), getExchange(), getRoutingKey());
101 | }
102 | }
103 |
104 | log.info("bound to:"
105 | +"\n\t queue: " + getQueue()
106 | +"\n\t exchange: " + getExchange()
107 | +"\n\t exchange(D)? " + getExchangeDurable()
108 | +"\n\t routing key: " + getRoutingKey()
109 | +"\n\t arguments: " + getQueueArguments()
110 | );
111 |
112 | }
113 | return true;
114 | }
115 |
116 | private Map getQueueArguments() {
117 | Map arguments = new HashMap();
118 |
119 | if(getMessageTTL() != null && !getMessageTTL().isEmpty())
120 | arguments.put("x-message-ttl", getMessageTTLAsInt());
121 |
122 | if(getMessageExpires() != null && !getMessageExpires().isEmpty())
123 | arguments.put("x-expires", getMessageExpiresAsInt());
124 |
125 | return arguments;
126 | }
127 |
128 | protected abstract Channel getChannel();
129 | protected abstract void setChannel(Channel channel);
130 |
131 | /**
132 | * @return a string for the sampleResult Title
133 | */
134 | protected String getTitle() {
135 | return this.getName();
136 | }
137 |
138 | protected int getTimeoutAsInt() {
139 | if (getPropertyAsInt(TIMEOUT) < 1) {
140 | return DEFAULT_TIMEOUT;
141 | }
142 | return getPropertyAsInt(TIMEOUT);
143 | }
144 |
145 | public String getTimeout() {
146 | return getPropertyAsString(TIMEOUT, DEFAULT_TIMEOUT_STRING);
147 | }
148 |
149 |
150 | public void setTimeout(String s) {
151 | setProperty(TIMEOUT, s);
152 | }
153 |
154 | public String getIterations() {
155 | return getPropertyAsString(ITERATIONS, DEFAULT_ITERATIONS_STRING);
156 | }
157 |
158 | public void setIterations(String s) {
159 | setProperty(ITERATIONS, s);
160 | }
161 |
162 | public int getIterationsAsInt() {
163 | return getPropertyAsInt(ITERATIONS);
164 | }
165 |
166 | public String getExchange() {
167 | return getPropertyAsString(EXCHANGE);
168 | }
169 |
170 | public void setExchange(String name) {
171 | setProperty(EXCHANGE, name);
172 | }
173 |
174 |
175 | public boolean getExchangeDurable() {
176 | return getPropertyAsBoolean(EXCHANGE_DURABLE);
177 | }
178 |
179 | public void setExchangeDurable(boolean durable) {
180 | setProperty(EXCHANGE_DURABLE, durable);
181 | }
182 |
183 | public boolean getExchangeAutoDelete() {
184 | return getPropertyAsBoolean(EXCHANGE_AUTO_DELETE);
185 | }
186 |
187 | public void setExchangeAutoDelete(boolean autoDelete) {
188 | setProperty(EXCHANGE_AUTO_DELETE, autoDelete);
189 | }
190 |
191 | public String getExchangeType() {
192 | return getPropertyAsString(EXCHANGE_TYPE);
193 | }
194 |
195 | public void setExchangeType(String name) {
196 | setProperty(EXCHANGE_TYPE, name);
197 | }
198 |
199 |
200 | public Boolean getExchangeRedeclare() {
201 | return getPropertyAsBoolean(EXCHANGE_REDECLARE);
202 | }
203 |
204 | public void setExchangeRedeclare(Boolean content) {
205 | setProperty(EXCHANGE_REDECLARE, content);
206 | }
207 |
208 | public String getQueue() {
209 | return getPropertyAsString(QUEUE);
210 | }
211 |
212 | public void setQueue(String name) {
213 | setProperty(QUEUE, name);
214 | }
215 |
216 |
217 | public String getRoutingKey() {
218 | return getPropertyAsString(ROUTING_KEY);
219 | }
220 |
221 | public void setRoutingKey(String name) {
222 | setProperty(ROUTING_KEY, name);
223 | }
224 |
225 |
226 | public String getVirtualHost() {
227 | return getPropertyAsString(VIRUTAL_HOST);
228 | }
229 |
230 | public void setVirtualHost(String name) {
231 | setProperty(VIRUTAL_HOST, name);
232 | }
233 |
234 |
235 | public String getMessageTTL() {
236 | return getPropertyAsString(MESSAGE_TTL);
237 | }
238 |
239 | public void setMessageTTL(String name) {
240 | setProperty(MESSAGE_TTL, name);
241 | }
242 |
243 | protected Integer getMessageTTLAsInt() {
244 | if (getPropertyAsInt(MESSAGE_TTL) < 1) {
245 | return null;
246 | }
247 | return getPropertyAsInt(MESSAGE_TTL);
248 | }
249 |
250 |
251 | public String getMessageExpires() {
252 | return getPropertyAsString(MESSAGE_EXPIRES);
253 | }
254 |
255 | public void setMessageExpires(String name) {
256 | setProperty(MESSAGE_EXPIRES, name);
257 | }
258 |
259 | protected Integer getMessageExpiresAsInt() {
260 | if (getPropertyAsInt(MESSAGE_EXPIRES) < 1) {
261 | return null;
262 | }
263 | return getPropertyAsInt(MESSAGE_EXPIRES);
264 | }
265 |
266 |
267 | public String getHost() {
268 | return getPropertyAsString(HOST);
269 | }
270 |
271 | public void setHost(String name) {
272 | setProperty(HOST, name);
273 | }
274 |
275 |
276 | public String getPort() {
277 | return getPropertyAsString(PORT);
278 | }
279 |
280 | public void setPort(String name) {
281 | setProperty(PORT, name);
282 | }
283 |
284 | protected int getPortAsInt() {
285 | if (getPropertyAsInt(PORT) < 1) {
286 | return DEFAULT_PORT;
287 | }
288 | return getPropertyAsInt(PORT);
289 | }
290 |
291 | public void setConnectionSSL(String content) {
292 | setProperty(SSL, content);
293 | }
294 |
295 | public void setConnectionSSL(Boolean value) {
296 | setProperty(SSL, value.toString());
297 | }
298 |
299 | public boolean connectionSSL() {
300 | return getPropertyAsBoolean(SSL);
301 | }
302 |
303 |
304 | public String getUsername() {
305 | return getPropertyAsString(USERNAME);
306 | }
307 |
308 | public void setUsername(String name) {
309 | setProperty(USERNAME, name);
310 | }
311 |
312 |
313 | public String getPassword() {
314 | return getPropertyAsString(PASSWORD);
315 | }
316 |
317 | public void setPassword(String name) {
318 | setProperty(PASSWORD, name);
319 | }
320 |
321 | /**
322 | * @return the whether or not the queue is durable
323 | */
324 | public String getQueueDurable() {
325 | return getPropertyAsString(QUEUE_DURABLE);
326 | }
327 |
328 | public void setQueueDurable(String content) {
329 | setProperty(QUEUE_DURABLE, content);
330 | }
331 |
332 | public void setQueueDurable(Boolean value) {
333 | setProperty(QUEUE_DURABLE, value.toString());
334 | }
335 |
336 | public boolean queueDurable(){
337 | return getPropertyAsBoolean(QUEUE_DURABLE);
338 | }
339 |
340 | /**
341 | * @return the whether or not the queue is exclusive
342 | */
343 | public String getQueueExclusive() {
344 | return getPropertyAsString(QUEUE_EXCLUSIVE);
345 | }
346 |
347 | public void setQueueExclusive(String content) {
348 | setProperty(QUEUE_EXCLUSIVE, content);
349 | }
350 |
351 | public void setQueueExclusive(Boolean value) {
352 | setProperty(QUEUE_EXCLUSIVE, value.toString());
353 | }
354 |
355 | public boolean queueExclusive(){
356 | return getPropertyAsBoolean(QUEUE_EXCLUSIVE);
357 | }
358 |
359 | /**
360 | * @return the whether or not the queue should auto delete
361 | */
362 | public String getQueueAutoDelete() {
363 | return getPropertyAsString(QUEUE_AUTO_DELETE);
364 | }
365 |
366 | public void setQueueAutoDelete(String content) {
367 | setProperty(QUEUE_AUTO_DELETE, content);
368 | }
369 |
370 | public void setQueueAutoDelete(Boolean value) {
371 | setProperty(QUEUE_AUTO_DELETE, value.toString());
372 | }
373 |
374 | public boolean queueAutoDelete(){
375 | return getPropertyAsBoolean(QUEUE_AUTO_DELETE);
376 | }
377 |
378 |
379 | public Boolean getQueueRedeclare() {
380 | return getPropertyAsBoolean(QUEUE_REDECLARE);
381 | }
382 |
383 | public void setQueueRedeclare(Boolean content) {
384 | setProperty(QUEUE_REDECLARE, content);
385 | }
386 |
387 | protected void cleanup() {
388 | try {
389 | //getChannel().close(); // closing the connection will close the channel if it's still open
390 | if(connection != null && connection.isOpen())
391 | connection.close();
392 | } catch (IOException e) {
393 | log.error("Failed to close connection", e);
394 | }
395 | }
396 |
397 | @Override
398 | public void threadFinished() {
399 | log.info("AMQPSampler.threadFinished called");
400 | cleanup();
401 | }
402 |
403 | @Override
404 | public void threadStarted() {
405 |
406 | }
407 |
408 | protected Channel createChannel() throws IOException, NoSuchAlgorithmException, KeyManagementException {
409 | log.info("Creating channel " + getVirtualHost()+":"+getPortAsInt());
410 |
411 | if (connection == null || !connection.isOpen()) {
412 | factory.setConnectionTimeout(getTimeoutAsInt());
413 | factory.setVirtualHost(getVirtualHost());
414 | factory.setUsername(getUsername());
415 | factory.setPassword(getPassword());
416 | if (connectionSSL()) {
417 | factory.useSslProtocol("TLS");
418 | }
419 |
420 | log.info("RabbitMQ ConnectionFactory using:"
421 | +"\n\t virtual host: " + getVirtualHost()
422 | +"\n\t host: " + getHost()
423 | +"\n\t port: " + getPort()
424 | +"\n\t username: " + getUsername()
425 | +"\n\t password: " + getPassword()
426 | +"\n\t timeout: " + getTimeout()
427 | +"\n\t heartbeat: " + factory.getRequestedHeartbeat()
428 | +"\nin " + this
429 | );
430 |
431 | String[] hosts = getHost().split(",");
432 | Address[] addresses = new Address[hosts.length];
433 | for (int i = 0; i < hosts.length; i++) {
434 | addresses[i] = new Address(hosts[i], getPortAsInt());
435 | }
436 | log.info("Using hosts: " + Arrays.toString(hosts) + " addresses: " + Arrays.toString(addresses));
437 | connection = factory.newConnection(addresses);
438 | }
439 |
440 | Channel channel = connection.createChannel();
441 | if(!channel.isOpen()){
442 | log.fatalError("Failed to open channel: " + channel.getCloseReason().getLocalizedMessage());
443 | }
444 | return channel;
445 | }
446 |
447 | protected void deleteQueue() throws IOException, NoSuchAlgorithmException, KeyManagementException {
448 | // use a different channel since channel closes on exception.
449 | Channel channel = createChannel();
450 | try {
451 | log.info("Deleting queue " + getQueue());
452 | channel.queueDelete(getQueue());
453 | }
454 | catch(Exception ex) {
455 | log.debug(ex.toString(), ex);
456 | // ignore it.
457 | }
458 | finally {
459 | if (channel.isOpen()) {
460 | channel.close();
461 | }
462 | }
463 | }
464 |
465 | protected void deleteExchange() throws IOException, NoSuchAlgorithmException, KeyManagementException {
466 | // use a different channel since channel closes on exception.
467 | Channel channel = createChannel();
468 | try {
469 | log.info("Deleting exchange " + getExchange());
470 | channel.exchangeDelete(getExchange());
471 | }
472 | catch(Exception ex) {
473 | log.debug(ex.toString(), ex);
474 | // ignore it.
475 | }
476 | finally {
477 | if (channel.isOpen()) {
478 | channel.close();
479 | }
480 | }
481 | }
482 | }
483 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 | ============================ End of Apache License file V 2.0 ===================
204 |
205 | Third party licenses
206 | ====================
207 |
208 | BeanShell 2.0b5
209 | =========
210 | Licensed under The Sun Public License 1.0, http://java.sun.com/spl.html
211 |
212 | SUN PUBLIC LICENSE Version 1.0
213 |
214 | 1. Definitions.
215 |
216 | 1.0.1. "Commercial Use" means distribution or otherwise making the
217 | Covered Code available to a third party.
218 |
219 | 1.1. "Contributor" means each entity that creates or contributes to
220 | the creation of Modifications.
221 |
222 | 1.2. "Contributor Version" means the combination of the Original Code,
223 | prior Modifications used by a Contributor, and the Modifications made
224 | by that particular Contributor.
225 |
226 | 1.3. "Covered Code" means the Original Code or Modifications or the
227 | combination of the Original Code and Modifications, in each case
228 | including portions thereof and corresponding documentation released
229 | with the source code.
230 |
231 | 1.4. "Electronic Distribution Mechanism" means a mechanism generally
232 | accepted in the software development community for the electronic
233 | transfer of data.
234 |
235 | 1.5. "Executable" means Covered Code in any form other than Source
236 | Code.
237 |
238 | 1.6. "Initial Developer" means the individual or entity identified as
239 | the Initial Developer in the Source Code notice required by Exhibit A.
240 |
241 | 1.7. "Larger Work" means a work which combines Covered Code or
242 | portions thereof with code not governed by the terms of this License.
243 |
244 | 1.8. "License" means this document.
245 |
246 | 1.8.1. "Licensable" means having the right to grant, to the maximum
247 | extent possible, whether at the time of the initial grant or
248 | subsequently acquired, any and all of the rights conveyed herein.
249 |
250 | 1.9. "Modifications" means any addition to or deletion from the
251 | substance or structure of either the Original Code or any previous
252 | Modifications. When Covered Code is released as a series of files, a
253 | Modification is:
254 |
255 | A. Any addition to or deletion from the contents of a file containing
256 | Original Code or previous Modifications.
257 |
258 | B. Any new file that contains any part of the Original Code or
259 | previous Modifications.
260 |
261 | 1.10. "Original Code" means Source Code of computer software code
262 | which is described in the Source Code notice required by Exhibit A as
263 | Original Code, and which, at the time of its release under this
264 | License is not already Covered Code governed by this License.
265 |
266 | 1.10.1. "Patent Claims" means any patent claim(s), now owned or
267 | hereafter acquired, including without limitation, method, process, and
268 | apparatus claims, in any patent Licensable by grantor.
269 |
270 | 1.11. "Source Code" means the preferred form of the Covered Code for
271 | making modifications to it, including all modules it contains, plus
272 | any associated documentation, interface definition files, scripts used
273 | to control compilation and installation of an Executable, or source
274 | code differential comparisons against either the Original Code or
275 | another well known, available Covered Code of the Contributor's
276 | choice. The Source Code can be in a compressed or archival form,
277 | provided the appropriate decompression or de-archiving software is
278 | widely available for no charge.
279 |
280 | 1.12. "You" (or "Your") means an individual or a legal entity
281 | exercising rights under, and complying with all of the terms of, this
282 | License or a future version of this License issued under Section 6.1.
283 | For legal entities, "You" includes any entity which controls, is
284 | controlled by, or is under common control with You. For purposes of
285 | this definition, "control" means (a) the power, direct or indirect, to
286 | cause the direction or management of such entity, whether by contract
287 | or otherwise, or (b) ownership of more than fifty percent (50%) of the
288 | outstanding shares or beneficial ownership of such entity.
289 |
290 | 2. Source Code License.
291 |
292 | 2.1 The Initial Developer Grant.
293 |
294 | The Initial Developer hereby grants You a world-wide, royalty-free,
295 | non-exclusive license, subject to third party intellectual property
296 | claims:
297 |
298 | (a) under intellectual property rights (other than patent or
299 | trademark) Licensable by Initial Developer to use, reproduce, modify,
300 | display, perform, sublicense and distribute the Original Code (or
301 | portions thereof) with or without Modifications, and/or as part of a
302 | Larger Work; and
303 |
304 | (b) under Patent Claims infringed by the making, using or selling of
305 | Original Code, to make, have made, use, practice, sell, and offer for
306 | sale, and/or otherwise dispose of the Original Code (or portions
307 | thereof).
308 |
309 | (c) the licenses granted in this Section 2.1(a) and (b) are effective
310 | on the date Initial Developer first distributes Original Code under
311 | the terms of this License.
312 |
313 | (d) Notwithstanding Section 2.1(b) above, no patent license is
314 | granted: 1) for code that You delete from the Original Code; 2)
315 | separate from the Original Code; or 3) for infringements caused by:
316 | i) the modification of the Original Code or ii) the combination of the
317 | Original Code with other software or devices.
318 |
319 | 2.2. Contributor Grant.
320 |
321 | Subject to third party intellectual property claims, each Contributor
322 | hereby grants You a world-wide, royalty-free, non-exclusive license
323 |
324 | (a) under intellectual property rights (other than patent or
325 | trademark) Licensable by Contributor, to use, reproduce, modify,
326 | display, perform, sublicense and distribute the Modifications created
327 | by such Contributor (or portions thereof) either on an unmodified
328 | basis, with other Modifications, as Covered Code and/or as part of a
329 | Larger Work; and
330 |
331 | (b) under Patent Claims infringed by the making, using, or selling of
332 | Modifications made by that Contributor either alone and/or in
333 | combination with its Contributor Version (or portions of such
334 | combination), to make, use, sell, offer for sale, have made, and/or
335 | otherwise dispose of: 1) Modifications made by that Contributor (or
336 | portions thereof); and 2) the combination of Modifications made by
337 | that Contributor with its Contributor Version (or portions of such
338 | combination).
339 |
340 | (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective
341 | on the date Contributor first makes Commercial Use of the Covered
342 | Code.
343 |
344 | (d) notwithstanding Section 2.2(b) above, no patent license is
345 | granted: 1) for any code that Contributor has deleted from the
346 | Contributor Version; 2) separate from the Contributor Version; 3) for
347 | infringements caused by: i) third party modifications of Contributor
348 | Version or ii) the combination of Modifications made by that
349 | Contributor with other software (except as part of the Contributor
350 | Version) or other devices; or 4) under Patent Claims infringed by
351 | Covered Code in the absence of Modifications made by that Contributor.
352 |
353 | 3. Distribution Obligations.
354 |
355 | 3.1. Application of License.
356 |
357 | The Modifications which You create or to which You contribute are
358 | governed by the terms of this License, including without limitation
359 | Section 2.2. The Source Code version of Covered Code may be
360 | distributed only under the terms of this License or a future version
361 | of this License released under Section 6.1, and You must include a
362 | copy of this License with every copy of the Source Code You
363 | distribute. You may not offer or impose any terms on any Source Code
364 | version that alters or restricts the applicable version of this
365 | License or the recipients' rights hereunder. However, You may include
366 | an additional document offering the additional rights described in
367 | Section 3.5.
368 |
369 | 3.2. Availability of Source Code.
370 |
371 | Any Modification which You create or to which You contribute must be
372 | made available in Source Code form under the terms of this License
373 | either on the same media as an Executable version or via an accepted
374 | Electronic Distribution Mechanism to anyone to whom you made an
375 | Executable version available; and if made available via Electronic
376 | Distribution Mechanism, must remain available for at least twelve (12)
377 | months after the date it initially became available, or at least six
378 | (6) months after a subsequent version of that particular Modification
379 | has been made available to such recipients. You are responsible for
380 | ensuring that the Source Code version remains available even if the
381 | Electronic Distribution Mechanism is maintained by a third party.
382 |
383 | 3.3. Description of Modifications.
384 |
385 | You must cause all Covered Code to which You contribute to contain a
386 | file documenting the changes You made to create that Covered Code and
387 | the date of any change. You must include a prominent statement that
388 | the Modification is derived, directly or indirectly, from Original
389 | Code provided by the Initial Developer and including the name of the
390 | Initial Developer in (a) the Source Code, and (b) in any notice in an
391 | Executable version or related documentation in which You describe the
392 | origin or ownership of the Covered Code.
393 |
394 | 3.4. Intellectual Property Matters.
395 |
396 | (a) Third Party Claims.
397 |
398 | If Contributor has knowledge that a license under a third party's
399 | intellectual property rights is required to exercise the rights
400 | granted by such Contributor under Sections 2.1 or 2.2, Contributor
401 | must include a text file with the Source Code distribution titled
402 | "LEGAL'' which describes the claim and the party making the claim in
403 | sufficient detail that a recipient will know whom to contact. If
404 | Contributor obtains such knowledge after the Modification is made
405 | available as described in Section 3.2, Contributor shall promptly
406 | modify the LEGAL file in all copies Contributor makes available
407 | thereafter and shall take other steps (such as notifying appropriate
408 | mailing lists or newsgroups) reasonably calculated to inform those who
409 | received the Covered Code that new knowledge has been obtained.
410 |
411 | (b) Contributor APIs.
412 |
413 | If Contributor's Modifications include an application programming
414 | interface ("API") and Contributor has knowledge of patent licenses
415 | which are reasonably necessary to implement that API, Contributor must
416 | also include this information in the LEGAL file.
417 |
418 | (c) Representations.
419 |
420 | Contributor represents that, except as disclosed pursuant to Section
421 | 3.4(a) above, Contributor believes that Contributor's Modifications
422 | are Contributor's original creation(s) and/or Contributor has
423 | sufficient rights to grant the rights conveyed by this License.
424 |
425 | 3.5. Required Notices.
426 |
427 | You must duplicate the notice in Exhibit A in each file of the Source
428 | Code. If it is not possible to put such notice in a particular Source
429 | Code file due to its structure, then You must include such notice in a
430 | location (such as a relevant directory) where a user would be likely
431 | to look for such a notice. If You created one or more Modification(s)
432 | You may add your name as a Contributor to the notice described in
433 | Exhibit A. You must also duplicate this License in any documentation
434 | for the Source Code where You describe recipients' rights or ownership
435 | rights relating to Covered Code. You may choose to offer, and to
436 | charge a fee for, warranty, support, indemnity or liability
437 | obligations to one or more recipients of Covered Code. However, You
438 | may do so only on Your own behalf, and not on behalf of the Initial
439 | Developer or any Contributor. You must make it absolutely clear than
440 | any such warranty, support, indemnity or liability obligation is
441 | offered by You alone, and You hereby agree to indemnify the Initial
442 | Developer and every Contributor for any liability incurred by the
443 | Initial Developer or such Contributor as a result of warranty,
444 | support, indemnity or liability terms You offer.
445 |
446 | 3.6. Distribution of Executable Versions.
447 |
448 | You may distribute Covered Code in Executable form only if the
449 | requirements of Section 3.1-3.5 have been met for that Covered Code,
450 | and if You include a notice stating that the Source Code version of
451 | the Covered Code is available under the terms of this License,
452 | including a description of how and where You have fulfilled the
453 | obligations of Section 3.2. The notice must be conspicuously included
454 | in any notice in an Executable version, related documentation or
455 | collateral in which You describe recipients' rights relating to the
456 | Covered Code. You may distribute the Executable version of Covered
457 | Code or ownership rights under a license of Your choice, which may
458 | contain terms different from this License, provided that You are in
459 | compliance with the terms of this License and that the license for the
460 | Executable version does not attempt to limit or alter the recipient's
461 | rights in the Source Code version from the rights set forth in this
462 | License. If You distribute the Executable version under a different
463 | license You must make it absolutely clear that any terms which differ
464 | from this License are offered by You alone, not by the Initial
465 | Developer or any Contributor. You hereby agree to indemnify the
466 | Initial Developer and every Contributor for any liability incurred by
467 | the Initial Developer or such Contributor as a result of any such
468 | terms You offer.
469 |
470 | 3.7. Larger Works.
471 |
472 | You may create a Larger Work by combining Covered Code with other code
473 | not governed by the terms of this License and distribute the Larger
474 | Work as a single product. In such a case, You must make sure the
475 | requirements of this License are fulfilled for the Covered Code.
476 |
477 | 4. Inability to Comply Due to Statute or Regulation.
478 |
479 | If it is impossible for You to comply with any of the terms of this
480 | License with respect to some or all of the Covered Code due to
481 | statute, judicial order, or regulation then You must: (a) comply with
482 | the terms of this License to the maximum extent possible; and (b)
483 | describe the limitations and the code they affect. Such description
484 | must be included in the LEGAL file described in Section 3.4 and must
485 | be included with all distributions of the Source Code. Except to the
486 | extent prohibited by statute or regulation, such description must be
487 | sufficiently detailed for a recipient of ordinary skill to be able to
488 | understand it.
489 |
490 | 5. Application of this License.
491 |
492 | This License applies to code to which the Initial Developer has
493 | attached the notice in Exhibit A and to related Covered Code.
494 |
495 | 6. Versions of the License.
496 |
497 | 6.1. New Versions.
498 |
499 | Sun Microsystems, Inc. ("Sun") may publish revised and/or new versions
500 | of the License from time to time. Each version will be given a
501 | distinguishing version number.
502 |
503 | 6.2. Effect of New Versions.
504 |
505 | Once Covered Code has been published under a particular version of the
506 | License, You may always continue to use it under the terms of that
507 | version. You may also choose to use such Covered Code under the terms
508 | of any subsequent version of the License published by Sun. No one
509 | other than Sun has the right to modify the terms applicable to Covered
510 | Code created under this License.
511 |
512 | 6.3. Derivative Works.
513 |
514 | If You create or use a modified version of this License (which you may
515 | only do in order to apply it to code which is not already Covered Code
516 | governed by this License), You must: (a) rename Your license so that
517 | the phrases "Sun," "Sun Public License," or "SPL" or any confusingly
518 | similar phrase do not appear in your license (except to note that your
519 | license differs from this License) and (b) otherwise make it clear
520 | that Your version of the license contains terms which differ from the
521 | Sun Public License. (Filling in the name of the Initial Developer,
522 | Original Code or Contributor in the notice described in Exhibit A
523 | shall not of themselves be deemed to be modifications of this
524 | License.)
525 |
526 | 7. DISCLAIMER OF WARRANTY.
527 |
528 | COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS,
529 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
530 | WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
531 | DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
532 | THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
533 | IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
534 | YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
535 | COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
536 | OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
537 | ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
538 |
539 | 8. TERMINATION.
540 |
541 | 8.1. This License and the rights granted hereunder will terminate
542 | automatically if You fail to comply with terms herein and fail to cure
543 | such breach within 30 days of becoming aware of the breach. All
544 | sublicenses to the Covered Code which are properly granted shall
545 | survive any termination of this License. Provisions which, by their
546 | nature, must remain in effect beyond the termination of this License
547 | shall survive.
548 |
549 | 8.2. If You initiate litigation by asserting a patent infringement
550 | claim (excluding declaratory judgment actions) against Initial Developer
551 | or a Contributor (the Initial Developer or Contributor against whom
552 | You file such action is referred to as "Participant") alleging that:
553 |
554 | (a) such Participant's Contributor Version directly or indirectly
555 | infringes any patent, then any and all rights granted by such
556 | Participant to You under Sections 2.1 and/or 2.2 of this License
557 | shall, upon 60 days notice from Participant terminate prospectively,
558 | unless if within 60 days after receipt of notice You either: (i)
559 | agree in writing to pay Participant a mutually agreeable reasonable
560 | royalty for Your past and future use of Modifications made by such
561 | Participant, or (ii) withdraw Your litigation claim with respect to
562 | the Contributor Version against such Participant. If within 60 days
563 | of notice, a reasonable royalty and payment arrangement are not
564 | mutually agreed upon in writing by the parties or the litigation claim
565 | is not withdrawn, the rights granted by Participant to You under
566 | Sections 2.1 and/or 2.2 automatically terminate at the expiration of
567 | the 60 day notice period specified above.
568 |
569 | (b) any software, hardware, or device, other than such Participant's
570 | Contributor Version, directly or indirectly infringes any patent, then
571 | any rights granted to You by such Participant under Sections 2.1(b)
572 | and 2.2(b) are revoked effective as of the date You first made, used,
573 | sold, distributed, or had made, Modifications made by that
574 | Participant.
575 |
576 | 8.3. If You assert a patent infringement claim against Participant
577 | alleging that such Participant's Contributor Version directly or
578 | indirectly infringes any patent where such claim is resolved (such as
579 | by license or settlement) prior to the initiation of patent
580 | infringement litigation, then the reasonable value of the licenses
581 | granted by such Participant under Sections 2.1 or 2.2 shall be taken
582 | into account in determining the amount or value of any payment or
583 | license.
584 |
585 | 8.4. In the event of termination under Sections 8.1 or 8.2 above, all
586 | end user license agreements (excluding distributors and resellers)
587 | which have been validly granted by You or any distributor hereunder
588 | prior to termination shall survive termination.
589 |
590 | 9. LIMITATION OF LIABILITY.
591 |
592 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
593 | (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
594 | DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
595 | OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
596 | ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
597 | CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
598 | WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
599 | COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
600 | INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
601 | LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
602 | RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
603 | PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
604 | EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
605 | THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
606 |
607 | 10. U.S. GOVERNMENT END USERS.
608 |
609 | The Covered Code is a "commercial item," as that term is defined in 48
610 | C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software"
611 | and "commercial computer software documentation," as such terms are
612 | used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
613 | 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
614 | U.S. Government End Users acquire Covered Code with only those rights
615 | set forth herein.
616 |
617 | 11. MISCELLANEOUS.
618 |
619 | This License represents the complete agreement concerning subject
620 | matter hereof. If any provision of this License is held to be
621 | unenforceable, such provision shall be reformed only to the extent
622 | necessary to make it enforceable. This License shall be governed by
623 | California law provisions (except to the extent applicable law, if
624 | any, provides otherwise), excluding its conflict-of-law provisions.
625 | With respect to disputes in which at least one party is a citizen of,
626 | or an entity chartered or registered to do business in the United
627 | States of America, any litigation relating to this License shall be
628 | subject to the jurisdiction of the Federal Courts of the Northern
629 | District of California, with venue lying in Santa Clara County,
630 | California, with the losing party responsible for costs, including
631 | without limitation, court costs and reasonable attorneys' fees and
632 | expenses. The application of the United Nations Convention on
633 | Contracts for the International Sale of Goods is expressly excluded.
634 | Any law or regulation which provides that the language of a contract
635 | shall be construed against the drafter shall not apply to this
636 | License.
637 |
638 | 12. RESPONSIBILITY FOR CLAIMS.
639 |
640 | As between Initial Developer and the Contributors, each party is
641 | responsible for claims and damages arising, directly or indirectly,
642 | out of its utilization of rights under this License and You agree to
643 | work with Initial Developer and Contributors to distribute such
644 | responsibility on an equitable basis. Nothing herein is intended or
645 | shall be deemed to constitute any admission of liability.
646 |
647 | 13. MULTIPLE-LICENSED CODE.
648 |
649 | Initial Developer may designate portions of the Covered Code as
650 | ?Multiple-Licensed?. ?Multiple-Licensed? means that the Initial
651 | Developer permits you to utilize portions of the Covered Code under
652 | Your choice of the alternative licenses, if any, specified by the
653 | Initial Developer in the file described in Exhibit A.
654 |
655 | Exhibit A -Sun Public License Notice.
656 |
657 | The contents of this file are subject to the Sun Public License
658 | Version 1.0 (the "License"); you may not use this file except in
659 | compliance with the License. A copy of the License is available at
660 | http://www.sun.com/
661 |
662 | The Original Code is _________________. The Initial Developer of the
663 | Original Code is ___________. Portions created by ______ are Copyright
664 | (C)_________. All Rights Reserved.
665 |
666 | Contributor(s): ______________________________________.
667 |
668 | Alternatively, the contents of this file may be used under the terms
669 | of the _____ license (the ?[___] License?), in which case the
670 | provisions of [______] License are applicable instead of those above.
671 | If you wish to allow use of your version of this file only under the
672 | terms of the [____] License and not to allow others to use your
673 | version of this file under the SPL, indicate your decision by deleting
674 | the provisions above and replace them with the notice and other
675 | provisions required by the [___] License. If you do not delete the
676 | provisions above, a recipient may use your version of this file under
677 | either the SPL or the [___] License."
678 |
679 | [NOTE: The text of this Exhibit A may differ slightly from the text of
680 | the notices in the Source Code files of the Original Code. You should
681 | use the text of this Exhibit A rather than the text found in the
682 | Original Code Source Code for Your Modifications.]
683 |
684 | ################################################################################
685 |
686 | HtmlParser & HtmlLexer v2.1
687 | ======================
688 |
689 | also
690 |
691 | JUnit v4.9
692 | =====
693 |
694 | http://opensource.org/licenses/cpl1.0.txt
695 | =========================================
696 |
697 | Common Public License Version 1.0
698 | Fri, 2007-06-01 17:16 - nelson
699 |
700 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
701 | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
702 | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
703 |
704 | 1. DEFINITIONS
705 |
706 | "Contribution" means:
707 |
708 | a) in the case of the initial Contributor, the initial code and
709 | documentation distributed under this Agreement, and
710 |
711 | b) in the case of each subsequent Contributor:
712 |
713 | i) changes to the Program, and
714 |
715 | ii) additions to the Program;
716 |
717 | where such changes and/or additions to the Program originate from and are
718 | distributed by that particular Contributor. A Contribution 'originates' from a
719 | Contributor if it was added to the Program by such Contributor itself or anyone
720 | acting on such Contributor's behalf. Contributions do not include additions to
721 | the Program which: (i) are separate modules of software distributed in
722 | conjunction with the Program under their own license agreement, and (ii) are not
723 | derivative works of the Program.
724 |
725 | "Contributor" means any person or entity that distributes the Program.
726 |
727 | "Licensed Patents " mean patent claims licensable by a Contributor which are
728 | necessarily infringed by the use or sale of its Contribution alone or when
729 | combined with the Program.
730 |
731 | "Program" means the Contributions distributed in accordance with this Agreement.
732 |
733 | "Recipient" means anyone who receives the Program under this Agreement,
734 | including all Contributors.
735 |
736 | 2. GRANT OF RIGHTS
737 |
738 | a) Subject to the terms of this Agreement, each Contributor hereby grants
739 | Recipient a non-exclusive, worldwide, royalty-free copyright license to
740 | reproduce, prepare derivative works of, publicly display, publicly perform,
741 | distribute and sublicense the Contribution of such Contributor, if any, and such
742 | derivative works, in source code and object code form.
743 |
744 | b) Subject to the terms of this Agreement, each Contributor hereby grants
745 | Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
746 | Patents to make, use, sell, offer to sell, import and otherwise transfer the
747 | Contribution of such Contributor, if any, in source code and object code form.
748 | This patent license shall apply to the combination of the Contribution and the
749 | Program if, at the time the Contribution is added by the Contributor, such
750 | addition of the Contribution causes such combination to be covered by the
751 | Licensed Patents. The patent license shall not apply to any other combinations
752 | which include the Contribution. No hardware per se is licensed hereunder.
753 |
754 | c) Recipient understands that although each Contributor grants the licenses
755 | to its Contributions set forth herein, no assurances are provided by any
756 | Contributor that the Program does not infringe the patent or other intellectual
757 | property rights of any other entity. Each Contributor disclaims any liability to
758 | Recipient for claims brought by any other entity based on infringement of
759 | intellectual property rights or otherwise. As a condition to exercising the
760 | rights and licenses granted hereunder, each Recipient hereby assumes sole
761 | responsibility to secure any other intellectual property rights needed, if any.
762 | For example, if a third party patent license is required to allow Recipient to
763 | distribute the Program, it is Recipient's responsibility to acquire that license
764 | before distributing the Program.
765 |
766 | d) Each Contributor represents that to its knowledge it has sufficient
767 | copyright rights in its Contribution, if any, to grant the copyright license set
768 | forth in this Agreement.
769 |
770 | 3. REQUIREMENTS
771 |
772 | A Contributor may choose to distribute the Program in object code form under its
773 | own license agreement, provided that:
774 |
775 | a) it complies with the terms and conditions of this Agreement; and
776 |
777 | b) its license agreement:
778 |
779 | i) effectively disclaims on behalf of all Contributors all warranties and
780 | conditions, express and implied, including warranties or conditions of title and
781 | non-infringement, and implied warranties or conditions of merchantability and
782 | fitness for a particular purpose;
783 |
784 | ii) effectively excludes on behalf of all Contributors all liability for
785 | damages, including direct, indirect, special, incidental and consequential
786 | damages, such as lost profits;
787 |
788 | iii) states that any provisions which differ from this Agreement are offered
789 | by that Contributor alone and not by any other party; and
790 |
791 | iv) states that source code for the Program is available from such
792 | Contributor, and informs licensees how to obtain it in a reasonable manner on or
793 | through a medium customarily used for software exchange.
794 |
795 | When the Program is made available in source code form:
796 |
797 | a) it must be made available under this Agreement; and
798 |
799 | b) a copy of this Agreement must be included with each copy of the Program.
800 |
801 | Contributors may not remove or alter any copyright notices contained within the
802 | Program.
803 |
804 | Each Contributor must identify itself as the originator of its Contribution, if
805 | any, in a manner that reasonably allows subsequent Recipients to identify the
806 | originator of the Contribution.
807 |
808 | 4. COMMERCIAL DISTRIBUTION
809 |
810 | Commercial distributors of software may accept certain responsibilities with
811 | respect to end users, business partners and the like. While this license is
812 | intended to facilitate the commercial use of the Program, the Contributor who
813 | includes the Program in a commercial product offering should do so in a manner
814 | which does not create potential liability for other Contributors. Therefore, if
815 | a Contributor includes the Program in a commercial product offering, such
816 | Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
817 | every other Contributor ("Indemnified Contributor") against any losses, damages
818 | and costs (collectively "Losses") arising from claims, lawsuits and other legal
819 | actions brought by a third party against the Indemnified Contributor to the
820 | extent caused by the acts or omissions of such Commercial Contributor in
821 | connection with its distribution of the Program in a commercial product
822 | offering. The obligations in this section do not apply to any claims or Losses
823 | relating to any actual or alleged intellectual property infringement. In order
824 | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
825 | Contributor in writing of such claim, and b) allow the Commercial Contributor to
826 | control, and cooperate with the Commercial Contributor in, the defense and any
827 | related settlement negotiations. The Indemnified Contributor may participate in
828 | any such claim at its own expense.
829 |
830 | For example, a Contributor might include the Program in a commercial product
831 | offering, Product X. That Contributor is then a Commercial Contributor. If that
832 | Commercial Contributor then makes performance claims, or offers warranties
833 | related to Product X, those performance claims and warranties are such
834 | Commercial Contributor's responsibility alone. Under this section, the
835 | Commercial Contributor would have to defend claims against the other
836 | Contributors related to those performance claims and warranties, and if a court
837 | requires any other Contributor to pay any damages as a result, the Commercial
838 | Contributor must pay those damages.
839 |
840 | 5. NO WARRANTY
841 |
842 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
843 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
844 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
845 | NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
846 | Recipient is solely responsible for determining the appropriateness of using and
847 | distributing the Program and assumes all risks associated with its exercise of
848 | rights under this Agreement, including but not limited to the risks and costs of
849 | program errors, compliance with applicable laws, damage to or loss of data,
850 | programs or equipment, and unavailability or interruption of operations.
851 |
852 | 6. DISCLAIMER OF LIABILITY
853 |
854 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
855 | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
856 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
857 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
858 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
859 | OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
860 | GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
861 |
862 | 7. GENERAL
863 |
864 | If any provision of this Agreement is invalid or unenforceable under applicable
865 | law, it shall not affect the validity or enforceability of the remainder of the
866 | terms of this Agreement, and without further action by the parties hereto, such
867 | provision shall be reformed to the minimum extent necessary to make such
868 | provision valid and enforceable.
869 |
870 | If Recipient institutes patent litigation against a Contributor with respect to
871 | a patent applicable to software (including a cross-claim or counterclaim in a
872 | lawsuit), then any patent licenses granted by that Contributor to such Recipient
873 | under this Agreement shall terminate as of the date such litigation is filed. In
874 | addition, if Recipient institutes patent litigation against any entity
875 | (including a cross-claim or counterclaim in a lawsuit) alleging that the Program
876 | itself (excluding combinations of the Program with other software or hardware)
877 | infringes such Recipient's patent(s), then such Recipient's rights granted under
878 | Section 2(b) shall terminate as of the date such litigation is filed.
879 |
880 | All Recipient's rights under this Agreement shall terminate if it fails to
881 | comply with any of the material terms or conditions of this Agreement and does
882 | not cure such failure in a reasonable period of time after becoming aware of
883 | such noncompliance. If all Recipient's rights under this Agreement terminate,
884 | Recipient agrees to cease use and distribution of the Program as soon as
885 | reasonably practicable. However, Recipient's obligations under this Agreement
886 | and any licenses granted by Recipient relating to the Program shall continue and
887 | survive.
888 |
889 | Everyone is permitted to copy and distribute copies of this Agreement, but in
890 | order to avoid inconsistency the Agreement is copyrighted and may only be
891 | modified in the following manner. The Agreement Steward reserves the right to
892 | publish new versions (including revisions) of this Agreement from time to time.
893 | No one other than the Agreement Steward has the right to modify this Agreement.
894 | IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
895 | as the Agreement Steward to a suitable separate entity. Each new version of the
896 | Agreement will be given a distinguishing version number. The Program (including
897 | Contributions) may always be distributed subject to the version of the Agreement
898 | under which it was received. In addition, after a new version of the Agreement
899 | is published, Contributor may elect to distribute the Program (including its
900 | Contributions) under the new version. Except as expressly stated in Sections
901 | 2(a) and 2(b) above, Recipient receives no rights or licenses to the
902 | intellectual property of any Contributor under this Agreement, whether
903 | expressly, by implication, estoppel or otherwise. All rights in the Program not
904 | expressly granted under this Agreement are reserved.
905 |
906 | This Agreement is governed by the laws of the State of New York and the
907 | intellectual property laws of the United States of America. No party to this
908 | Agreement will bring a legal action under this Agreement more than one year
909 | after the cause of action arose. Each party waives its rights to a jury trial in
910 | any resulting litigation.
911 |
912 | ################################################################################
913 |
914 | jCharts v0.75
915 | =======
916 |
917 |
918 | jCharts License
919 | ----------------------------------------------------------------------------------------
920 |
921 | * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved.
922 | *
923 | * Redistribution and use of this software and associated documentation
924 | * ("Software"), with or without modification, are permitted provided
925 | * that the following conditions are met:
926 | *
927 | * 1. Redistributions of source code must retain copyright
928 | * statements and notices. Redistributions must also contain a
929 | * copy of this document.
930 | *
931 | * 2. Redistributions in binary form must reproduce the
932 | * above copyright notice, this list of conditions and the
933 | * following disclaimer in the documentation and/or other
934 | * materials provided with the distribution.
935 | *
936 | * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to
937 | * endorse or promote products derived from this Software without
938 | * prior written permission of Nathaniel G. Auvil. For written
939 | * permission, please contact nathaniel_auvil@users.sourceforge.net
940 | *
941 | * 4. Products derived from this Software may not be called "jCharts"
942 | * nor may "jCharts" appear in their names without prior written
943 | * permission of Nathaniel G. Auvil. jCharts is a registered
944 | * trademark of Nathaniel G. Auvil.
945 | *
946 | * 5. Due credit should be given to the jCharts Project
947 | * (http://jcharts.sourceforge.net/).
948 | *
949 | * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS
950 | * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
951 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
952 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
953 | * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
954 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
955 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
956 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
957 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
958 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
959 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
960 | * OF THE POSSIBILITY OF SUCH DAMAGE.
961 |
962 | ################################################################################
963 |
964 | JDOM v1.1
965 | ====
966 |
967 | /*--
968 |
969 | $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $
970 |
971 | Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
972 | All rights reserved.
973 |
974 | Redistribution and use in source and binary forms, with or without
975 | modification, are permitted provided that the following conditions
976 | are met:
977 |
978 | 1. Redistributions of source code must retain the above copyright
979 | notice, this list of conditions, and the following disclaimer.
980 |
981 | 2. Redistributions in binary form must reproduce the above copyright
982 | notice, this list of conditions, and the disclaimer that follows
983 | these conditions in the documentation and/or other materials
984 | provided with the distribution.
985 |
986 | 3. The name "JDOM" must not be used to endorse or promote products
987 | derived from this software without prior written permission. For
988 | written permission, please contact .
989 |
990 | 4. Products derived from this software may not be called "JDOM", nor
991 | may "JDOM" appear in their name, without prior written permission
992 | from the JDOM Project Management .
993 |
994 | In addition, we request (but do not require) that you include in the
995 | end-user documentation provided with the redistribution and/or in the
996 | software itself an acknowledgement equivalent to the following:
997 | "This product includes software developed by the
998 | JDOM Project (http://www.jdom.org/)."
999 | Alternatively, the acknowledgment may be graphical using the logos
1000 | available at http://www.jdom.org/images/logos.
1001 |
1002 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
1003 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1004 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1005 | DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
1006 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1007 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1008 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
1009 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1010 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1011 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
1012 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1013 | SUCH DAMAGE.
1014 |
1015 | This software consists of voluntary contributions made by many
1016 | individuals on behalf of the JDOM Project and was originally
1017 | created by Jason Hunter and
1018 | Brett McLaughlin . For more information
1019 | on the JDOM Project, please see .
1020 |
1021 | */
1022 |
1023 |
1024 |
1025 | ################################################################################
1026 |
1027 | JTidy (r938)
1028 | =====
1029 |
1030 | Java HTML Tidy - JTidy
1031 | HTML parser and pretty printer
1032 |
1033 | Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
1034 | Institute of Technology, Institut National de Recherche en
1035 | Informatique et en Automatique, Keio University). All Rights
1036 | Reserved.
1037 |
1038 | Contributing Author(s):
1039 |
1040 | Dave Raggett
1041 | Andy Quick (translation to Java)
1042 | Gary L Peskin (Java development)
1043 | Sami Lempinen (release management)
1044 |
1045 | The contributing author(s) would like to thank all those who
1046 | helped with testing, bug fixes, and patience. This wouldn't
1047 | have been possible without all of you.
1048 |
1049 | COPYRIGHT NOTICE:
1050 |
1051 | This software and documentation is provided "as is," and
1052 | the copyright holders and contributing author(s) make no
1053 | representations or warranties, express or implied, including
1054 | but not limited to, warranties of merchantability or fitness
1055 | for any particular purpose or that the use of the software or
1056 | documentation will not infringe any third party patents,
1057 | copyrights, trademarks or other rights.
1058 |
1059 | The copyright holders and contributing author(s) will not be
1060 | liable for any direct, indirect, special or consequential damages
1061 | arising out of any use of the software or documentation, even if
1062 | advised of the possibility of such damage.
1063 |
1064 | Permission is hereby granted to use, copy, modify, and distribute
1065 | this source code, or portions hereof, documentation and executables,
1066 | for any purpose, without fee, subject to the following restrictions:
1067 |
1068 | 1. The origin of this source code must not be misrepresented.
1069 | 2. Altered versions must be plainly marked as such and must
1070 | not be misrepresented as being the original source.
1071 | 3. This Copyright notice may not be removed or altered from any
1072 | source or altered source distribution.
1073 |
1074 | The copyright holders and contributing author(s) specifically
1075 | permit, without fee, and encourage the use of this source code
1076 | as a component for supporting the Hypertext Markup Language in
1077 | commercial products. If you use this source code in a product,
1078 | acknowledgment is not required but would be appreciated.
1079 |
1080 |
1081 | ################################################################################
1082 |
1083 |
1084 | Mozilla Rhino JavaScript v1.6R5
1085 | ========================
1086 |
1087 | MPL 1.1 at http://www.mozilla.org/MPL/MPL-1.1.html
1088 |
1089 | MOZILLA PUBLIC LICENSE
1090 | Version 1.1
1091 |
1092 | ---------------
1093 |
1094 | 1. Definitions.
1095 |
1096 | 1.0.1. "Commercial Use" means distribution or otherwise making the
1097 | Covered Code available to a third party.
1098 |
1099 | 1.1. "Contributor" means each entity that creates or contributes to
1100 | the creation of Modifications.
1101 |
1102 | 1.2. "Contributor Version" means the combination of the Original
1103 | Code, prior Modifications used by a Contributor, and the Modifications
1104 | made by that particular Contributor.
1105 |
1106 | 1.3. "Covered Code" means the Original Code or Modifications or the
1107 | combination of the Original Code and Modifications, in each case
1108 | including portions thereof.
1109 |
1110 | 1.4. "Electronic Distribution Mechanism" means a mechanism generally
1111 | accepted in the software development community for the electronic
1112 | transfer of data.
1113 |
1114 | 1.5. "Executable" means Covered Code in any form other than Source
1115 | Code.
1116 |
1117 | 1.6. "Initial Developer" means the individual or entity identified
1118 | as the Initial Developer in the Source Code notice required by Exhibit
1119 | A.
1120 |
1121 | 1.7. "Larger Work" means a work which combines Covered Code or
1122 | portions thereof with code not governed by the terms of this License.
1123 |
1124 | 1.8. "License" means this document.
1125 |
1126 | 1.8.1. "Licensable" means having the right to grant, to the maximum
1127 | extent possible, whether at the time of the initial grant or
1128 | subsequently acquired, any and all of the rights conveyed herein.
1129 |
1130 | 1.9. "Modifications" means any addition to or deletion from the
1131 | substance or structure of either the Original Code or any previous
1132 | Modifications. When Covered Code is released as a series of files, a
1133 | Modification is:
1134 | A. Any addition to or deletion from the contents of a file
1135 | containing Original Code or previous Modifications.
1136 |
1137 | B. Any new file that contains any part of the Original Code or
1138 | previous Modifications.
1139 |
1140 | 1.10. "Original Code" means Source Code of computer software code
1141 | which is described in the Source Code notice required by Exhibit A as
1142 | Original Code, and which, at the time of its release under this
1143 | License is not already Covered Code governed by this License.
1144 |
1145 | 1.10.1. "Patent Claims" means any patent claim(s), now owned or
1146 | hereafter acquired, including without limitation, method, process,
1147 | and apparatus claims, in any patent Licensable by grantor.
1148 |
1149 | 1.11. "Source Code" means the preferred form of the Covered Code for
1150 | making modifications to it, including all modules it contains, plus
1151 | any associated interface definition files, scripts used to control
1152 | compilation and installation of an Executable, or source code
1153 | differential comparisons against either the Original Code or another
1154 | well known, available Covered Code of the Contributor's choice. The
1155 | Source Code can be in a compressed or archival form, provided the
1156 | appropriate decompression or de-archiving software is widely available
1157 | for no charge.
1158 |
1159 | 1.12. "You" (or "Your") means an individual or a legal entity
1160 | exercising rights under, and complying with all of the terms of, this
1161 | License or a future version of this License issued under Section 6.1.
1162 | For legal entities, "You" includes any entity which controls, is
1163 | controlled by, or is under common control with You. For purposes of
1164 | this definition, "control" means (a) the power, direct or indirect,
1165 | to cause the direction or management of such entity, whether by
1166 | contract or otherwise, or (b) ownership of more than fifty percent
1167 | (50%) of the outstanding shares or beneficial ownership of such
1168 | entity.
1169 |
1170 | 2. Source Code License.
1171 |
1172 | 2.1. The Initial Developer Grant.
1173 | The Initial Developer hereby grants You a world-wide, royalty-free,
1174 | non-exclusive license, subject to third party intellectual property
1175 | claims:
1176 | (a) under intellectual property rights (other than patent or
1177 | trademark) Licensable by Initial Developer to use, reproduce,
1178 | modify, display, perform, sublicense and distribute the Original
1179 | Code (or portions thereof) with or without Modifications, and/or
1180 | as part of a Larger Work; and
1181 |
1182 | (b) under Patents Claims infringed by the making, using or
1183 | selling of Original Code, to make, have made, use, practice,
1184 | sell, and offer for sale, and/or otherwise dispose of the
1185 | Original Code (or portions thereof).
1186 |
1187 | (c) the licenses granted in this Section 2.1(a) and (b) are
1188 | effective on the date Initial Developer first distributes
1189 | Original Code under the terms of this License.
1190 |
1191 | (d) Notwithstanding Section 2.1(b) above, no patent license is
1192 | granted: 1) for code that You delete from the Original Code; 2)
1193 | separate from the Original Code; or 3) for infringements caused
1194 | by: i) the modification of the Original Code or ii) the
1195 | combination of the Original Code with other software or devices.
1196 |
1197 | 2.2. Contributor Grant.
1198 | Subject to third party intellectual property claims, each Contributor
1199 | hereby grants You a world-wide, royalty-free, non-exclusive license
1200 |
1201 | (a) under intellectual property rights (other than patent or
1202 | trademark) Licensable by Contributor, to use, reproduce, modify,
1203 | display, perform, sublicense and distribute the Modifications
1204 | created by such Contributor (or portions thereof) either on an
1205 | unmodified basis, with other Modifications, as Covered Code
1206 | and/or as part of a Larger Work; and
1207 |
1208 | (b) under Patent Claims infringed by the making, using, or
1209 | selling of Modifications made by that Contributor either alone
1210 | and/or in combination with its Contributor Version (or portions
1211 | of such combination), to make, use, sell, offer for sale, have
1212 | made, and/or otherwise dispose of: 1) Modifications made by that
1213 | Contributor (or portions thereof); and 2) the combination of
1214 | Modifications made by that Contributor with its Contributor
1215 | Version (or portions of such combination).
1216 |
1217 | (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
1218 | effective on the date Contributor first makes Commercial Use of
1219 | the Covered Code.
1220 |
1221 | (d) Notwithstanding Section 2.2(b) above, no patent license is
1222 | granted: 1) for any code that Contributor has deleted from the
1223 | Contributor Version; 2) separate from the Contributor Version;
1224 | 3) for infringements caused by: i) third party modifications of
1225 | Contributor Version or ii) the combination of Modifications made
1226 | by that Contributor with other software (except as part of the
1227 | Contributor Version) or other devices; or 4) under Patent Claims
1228 | infringed by Covered Code in the absence of Modifications made by
1229 | that Contributor.
1230 |
1231 | 3. Distribution Obligations.
1232 |
1233 | 3.1. Application of License.
1234 | The Modifications which You create or to which You contribute are
1235 | governed by the terms of this License, including without limitation
1236 | Section 2.2. The Source Code version of Covered Code may be
1237 | distributed only under the terms of this License or a future version
1238 | of this License released under Section 6.1, and You must include a
1239 | copy of this License with every copy of the Source Code You
1240 | distribute. You may not offer or impose any terms on any Source Code
1241 | version that alters or restricts the applicable version of this
1242 | License or the recipients' rights hereunder. However, You may include
1243 | an additional document offering the additional rights described in
1244 | Section 3.5.
1245 |
1246 | 3.2. Availability of Source Code.
1247 | Any Modification which You create or to which You contribute must be
1248 | made available in Source Code form under the terms of this License
1249 | either on the same media as an Executable version or via an accepted
1250 | Electronic Distribution Mechanism to anyone to whom you made an
1251 | Executable version available; and if made available via Electronic
1252 | Distribution Mechanism, must remain available for at least twelve (12)
1253 | months after the date it initially became available, or at least six
1254 | (6) months after a subsequent version of that particular Modification
1255 | has been made available to such recipients. You are responsible for
1256 | ensuring that the Source Code version remains available even if the
1257 | Electronic Distribution Mechanism is maintained by a third party.
1258 |
1259 | 3.3. Description of Modifications.
1260 | You must cause all Covered Code to which You contribute to contain a
1261 | file documenting the changes You made to create that Covered Code and
1262 | the date of any change. You must include a prominent statement that
1263 | the Modification is derived, directly or indirectly, from Original
1264 | Code provided by the Initial Developer and including the name of the
1265 | Initial Developer in (a) the Source Code, and (b) in any notice in an
1266 | Executable version or related documentation in which You describe the
1267 | origin or ownership of the Covered Code.
1268 |
1269 | 3.4. Intellectual Property Matters
1270 | (a) Third Party Claims.
1271 | If Contributor has knowledge that a license under a third party's
1272 | intellectual property rights is required to exercise the rights
1273 | granted by such Contributor under Sections 2.1 or 2.2,
1274 | Contributor must include a text file with the Source Code
1275 | distribution titled "LEGAL" which describes the claim and the
1276 | party making the claim in sufficient detail that a recipient will
1277 | know whom to contact. If Contributor obtains such knowledge after
1278 | the Modification is made available as described in Section 3.2,
1279 | Contributor shall promptly modify the LEGAL file in all copies
1280 | Contributor makes available thereafter and shall take other steps
1281 | (such as notifying appropriate mailing lists or newsgroups)
1282 | reasonably calculated to inform those who received the Covered
1283 | Code that new knowledge has been obtained.
1284 |
1285 | (b) Contributor APIs.
1286 | If Contributor's Modifications include an application programming
1287 | interface and Contributor has knowledge of patent licenses which
1288 | are reasonably necessary to implement that API, Contributor must
1289 | also include this information in the LEGAL file.
1290 |
1291 | (c) Representations.
1292 | Contributor represents that, except as disclosed pursuant to
1293 | Section 3.4(a) above, Contributor believes that Contributor's
1294 | Modifications are Contributor's original creation(s) and/or
1295 | Contributor has sufficient rights to grant the rights conveyed by
1296 | this License.
1297 |
1298 | 3.5. Required Notices.
1299 | You must duplicate the notice in Exhibit A in each file of the Source
1300 | Code. If it is not possible to put such notice in a particular Source
1301 | Code file due to its structure, then You must include such notice in a
1302 | location (such as a relevant directory) where a user would be likely
1303 | to look for such a notice. If You created one or more Modification(s)
1304 | You may add your name as a Contributor to the notice described in
1305 | Exhibit A. You must also duplicate this License in any documentation
1306 | for the Source Code where You describe recipients' rights or ownership
1307 | rights relating to Covered Code. You may choose to offer, and to
1308 | charge a fee for, warranty, support, indemnity or liability
1309 | obligations to one or more recipients of Covered Code. However, You
1310 | may do so only on Your own behalf, and not on behalf of the Initial
1311 | Developer or any Contributor. You must make it absolutely clear than
1312 | any such warranty, support, indemnity or liability obligation is
1313 | offered by You alone, and You hereby agree to indemnify the Initial
1314 | Developer and every Contributor for any liability incurred by the
1315 | Initial Developer or such Contributor as a result of warranty,
1316 | support, indemnity or liability terms You offer.
1317 |
1318 | 3.6. Distribution of Executable Versions.
1319 | You may distribute Covered Code in Executable form only if the
1320 | requirements of Section 3.1-3.5 have been met for that Covered Code,
1321 | and if You include a notice stating that the Source Code version of
1322 | the Covered Code is available under the terms of this License,
1323 | including a description of how and where You have fulfilled the
1324 | obligations of Section 3.2. The notice must be conspicuously included
1325 | in any notice in an Executable version, related documentation or
1326 | collateral in which You describe recipients' rights relating to the
1327 | Covered Code. You may distribute the Executable version of Covered
1328 | Code or ownership rights under a license of Your choice, which may
1329 | contain terms different from this License, provided that You are in
1330 | compliance with the terms of this License and that the license for the
1331 | Executable version does not attempt to limit or alter the recipient's
1332 | rights in the Source Code version from the rights set forth in this
1333 | License. If You distribute the Executable version under a different
1334 | license You must make it absolutely clear that any terms which differ
1335 | from this License are offered by You alone, not by the Initial
1336 | Developer or any Contributor. You hereby agree to indemnify the
1337 | Initial Developer and every Contributor for any liability incurred by
1338 | the Initial Developer or such Contributor as a result of any such
1339 | terms You offer.
1340 |
1341 | 3.7. Larger Works.
1342 | You may create a Larger Work by combining Covered Code with other code
1343 | not governed by the terms of this License and distribute the Larger
1344 | Work as a single product. In such a case, You must make sure the
1345 | requirements of this License are fulfilled for the Covered Code.
1346 |
1347 | 4. Inability to Comply Due to Statute or Regulation.
1348 |
1349 | If it is impossible for You to comply with any of the terms of this
1350 | License with respect to some or all of the Covered Code due to
1351 | statute, judicial order, or regulation then You must: (a) comply with
1352 | the terms of this License to the maximum extent possible; and (b)
1353 | describe the limitations and the code they affect. Such description
1354 | must be included in the LEGAL file described in Section 3.4 and must
1355 | be included with all distributions of the Source Code. Except to the
1356 | extent prohibited by statute or regulation, such description must be
1357 | sufficiently detailed for a recipient of ordinary skill to be able to
1358 | understand it.
1359 |
1360 | 5. Application of this License.
1361 |
1362 | This License applies to code to which the Initial Developer has
1363 | attached the notice in Exhibit A and to related Covered Code.
1364 |
1365 | 6. Versions of the License.
1366 |
1367 | 6.1. New Versions.
1368 | Netscape Communications Corporation ("Netscape") may publish revised
1369 | and/or new versions of the License from time to time. Each version
1370 | will be given a distinguishing version number.
1371 |
1372 | 6.2. Effect of New Versions.
1373 | Once Covered Code has been published under a particular version of the
1374 | License, You may always continue to use it under the terms of that
1375 | version. You may also choose to use such Covered Code under the terms
1376 | of any subsequent version of the License published by Netscape. No one
1377 | other than Netscape has the right to modify the terms applicable to
1378 | Covered Code created under this License.
1379 |
1380 | 6.3. Derivative Works.
1381 | If You create or use a modified version of this License (which you may
1382 | only do in order to apply it to code which is not already Covered Code
1383 | governed by this License), You must (a) rename Your license so that
1384 | the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
1385 | "MPL", "NPL" or any confusingly similar phrase do not appear in your
1386 | license (except to note that your license differs from this License)
1387 | and (b) otherwise make it clear that Your version of the license
1388 | contains terms which differ from the Mozilla Public License and
1389 | Netscape Public License. (Filling in the name of the Initial
1390 | Developer, Original Code or Contributor in the notice described in
1391 | Exhibit A shall not of themselves be deemed to be modifications of
1392 | this License.)
1393 |
1394 | 7. DISCLAIMER OF WARRANTY.
1395 |
1396 | COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
1397 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
1398 | WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
1399 | DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
1400 | THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
1401 | IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
1402 | YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
1403 | COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
1404 | OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
1405 | ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
1406 |
1407 | 8. TERMINATION.
1408 |
1409 | 8.1. This License and the rights granted hereunder will terminate
1410 | automatically if You fail to comply with terms herein and fail to cure
1411 | such breach within 30 days of becoming aware of the breach. All
1412 | sublicenses to the Covered Code which are properly granted shall
1413 | survive any termination of this License. Provisions which, by their
1414 | nature, must remain in effect beyond the termination of this License
1415 | shall survive.
1416 |
1417 | 8.2. If You initiate litigation by asserting a patent infringement
1418 | claim (excluding declatory judgment actions) against Initial Developer
1419 | or a Contributor (the Initial Developer or Contributor against whom
1420 | You file such action is referred to as "Participant") alleging that:
1421 |
1422 | (a) such Participant's Contributor Version directly or indirectly
1423 | infringes any patent, then any and all rights granted by such
1424 | Participant to You under Sections 2.1 and/or 2.2 of this License
1425 | shall, upon 60 days notice from Participant terminate prospectively,
1426 | unless if within 60 days after receipt of notice You either: (i)
1427 | agree in writing to pay Participant a mutually agreeable reasonable
1428 | royalty for Your past and future use of Modifications made by such
1429 | Participant, or (ii) withdraw Your litigation claim with respect to
1430 | the Contributor Version against such Participant. If within 60 days
1431 | of notice, a reasonable royalty and payment arrangement are not
1432 | mutually agreed upon in writing by the parties or the litigation claim
1433 | is not withdrawn, the rights granted by Participant to You under
1434 | Sections 2.1 and/or 2.2 automatically terminate at the expiration of
1435 | the 60 day notice period specified above.
1436 |
1437 | (b) any software, hardware, or device, other than such Participant's
1438 | Contributor Version, directly or indirectly infringes any patent, then
1439 | any rights granted to You by such Participant under Sections 2.1(b)
1440 | and 2.2(b) are revoked effective as of the date You first made, used,
1441 | sold, distributed, or had made, Modifications made by that
1442 | Participant.
1443 |
1444 | 8.3. If You assert a patent infringement claim against Participant
1445 | alleging that such Participant's Contributor Version directly or
1446 | indirectly infringes any patent where such claim is resolved (such as
1447 | by license or settlement) prior to the initiation of patent
1448 | infringement litigation, then the reasonable value of the licenses
1449 | granted by such Participant under Sections 2.1 or 2.2 shall be taken
1450 | into account in determining the amount or value of any payment or
1451 | license.
1452 |
1453 | 8.4. In the event of termination under Sections 8.1 or 8.2 above,
1454 | all end user license agreements (excluding distributors and resellers)
1455 | which have been validly granted by You or any distributor hereunder
1456 | prior to termination shall survive termination.
1457 |
1458 | 9. LIMITATION OF LIABILITY.
1459 |
1460 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
1461 | (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
1462 | DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
1463 | OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
1464 | ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
1465 | CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
1466 | WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
1467 | COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
1468 | INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
1469 | LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
1470 | RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
1471 | PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
1472 | EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
1473 | THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
1474 |
1475 | 10. U.S. GOVERNMENT END USERS.
1476 |
1477 | The Covered Code is a "commercial item," as that term is defined in
1478 | 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
1479 | software" and "commercial computer software documentation," as such
1480 | terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
1481 | C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
1482 | all U.S. Government End Users acquire Covered Code with only those
1483 | rights set forth herein.
1484 |
1485 | 11. MISCELLANEOUS.
1486 |
1487 | This License represents the complete agreement concerning subject
1488 | matter hereof. If any provision of this License is held to be
1489 | unenforceable, such provision shall be reformed only to the extent
1490 | necessary to make it enforceable. This License shall be governed by
1491 | California law provisions (except to the extent applicable law, if
1492 | any, provides otherwise), excluding its conflict-of-law provisions.
1493 | With respect to disputes in which at least one party is a citizen of,
1494 | or an entity chartered or registered to do business in the United
1495 | States of America, any litigation relating to this License shall be
1496 | subject to the jurisdiction of the Federal Courts of the Northern
1497 | District of California, with venue lying in Santa Clara County,
1498 | California, with the losing party responsible for costs, including
1499 | without limitation, court costs and reasonable attorneys' fees and
1500 | expenses. The application of the United Nations Convention on
1501 | Contracts for the International Sale of Goods is expressly excluded.
1502 | Any law or regulation which provides that the language of a contract
1503 | shall be construed against the drafter shall not apply to this
1504 | License.
1505 |
1506 | 12. RESPONSIBILITY FOR CLAIMS.
1507 |
1508 | As between Initial Developer and the Contributors, each party is
1509 | responsible for claims and damages arising, directly or indirectly,
1510 | out of its utilization of rights under this License and You agree to
1511 | work with Initial Developer and Contributors to distribute such
1512 | responsibility on an equitable basis. Nothing herein is intended or
1513 | shall be deemed to constitute any admission of liability.
1514 |
1515 | 13. MULTIPLE-LICENSED CODE.
1516 |
1517 | Initial Developer may designate portions of the Covered Code as
1518 | "Multiple-Licensed". "Multiple-Licensed" means that the Initial
1519 | Developer permits you to utilize portions of the Covered Code under
1520 | Your choice of the NPL or the alternative licenses, if any, specified
1521 | by the Initial Developer in the file described in Exhibit A.
1522 |
1523 | EXHIBIT A -Mozilla Public License.
1524 |
1525 | ``The contents of this file are subject to the Mozilla Public License
1526 | Version 1.1 (the "License"); you may not use this file except in
1527 | compliance with the License. You may obtain a copy of the License at
1528 | http://www.mozilla.org/MPL/
1529 |
1530 | Software distributed under the License is distributed on an "AS IS"
1531 | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
1532 | License for the specific language governing rights and limitations
1533 | under the License.
1534 |
1535 | The Original Code is ______________________________________.
1536 |
1537 | The Initial Developer of the Original Code is ________________________.
1538 | Portions created by ______________________ are Copyright (C) ______
1539 | _______________________. All Rights Reserved.
1540 |
1541 | Contributor(s): ______________________________________.
1542 |
1543 | Alternatively, the contents of this file may be used under the terms
1544 | of the _____ license (the "[___] License"), in which case the
1545 | provisions of [______] License are applicable instead of those
1546 | above. If you wish to allow use of your version of this file only
1547 | under the terms of the [____] License and not to allow others to use
1548 | your version of this file under the MPL, indicate your decision by
1549 | deleting the provisions above and replace them with the notice and
1550 | other provisions required by the [___] License. If you do not delete
1551 | the provisions above, a recipient may use your version of this file
1552 | under either the MPL or the [___] License."
1553 |
1554 | [NOTE: The text of this Exhibit A may differ slightly from the text of
1555 | the notices in the Source Code files of the Original Code. You should
1556 | use the text of this Exhibit A rather than the text found in the
1557 | Original Code Source Code for Your Modifications.]
1558 |
1559 | ################################################################################
1560 |
1561 | XPP3 v1.1.4c
1562 | ====
1563 |
1564 | Indiana University Extreme! Lab Software License
1565 |
1566 | Version 1.1.1
1567 |
1568 | Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
1569 |
1570 | Redistribution and use in source and binary forms, with or without
1571 | modification, are permitted provided that the following conditions
1572 | are met:
1573 |
1574 | 1. Redistributions of source code must retain the above copyright notice,
1575 | this list of conditions and the following disclaimer.
1576 |
1577 | 2. Redistributions in binary form must reproduce the above copyright
1578 | notice, this list of conditions and the following disclaimer in
1579 | the documentation and/or other materials provided with the distribution.
1580 |
1581 | 3. The end-user documentation included with the redistribution, if any,
1582 | must include the following acknowledgment:
1583 |
1584 | "This product includes software developed by the Indiana University
1585 | Extreme! Lab (http://www.extreme.indiana.edu/)."
1586 |
1587 | Alternately, this acknowledgment may appear in the software itself,
1588 | if and wherever such third-party acknowledgments normally appear.
1589 |
1590 | 4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
1591 | must not be used to endorse or promote products derived from this
1592 | software without prior written permission. For written permission,
1593 | please contact http://www.extreme.indiana.edu/.
1594 |
1595 | 5. Products derived from this software may not use "Indiana Univeristy"
1596 | name nor may "Indiana Univeristy" appear in their name, without prior
1597 | written permission of the Indiana University.
1598 |
1599 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
1600 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1601 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1602 | IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
1603 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1604 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1605 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
1606 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1607 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1608 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1609 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1610 |
1611 |
1612 | ################################################################################
1613 |
1614 | XStream v1.3.1
1615 | =======
1616 |
1617 | http://xstream.codehaus.org/license.html
1618 |
1619 | Copyright (c) 2003-2006, Joe Walnes
1620 | Copyright (c) 2006-2007, XStream Committers
1621 | All rights reserved.
1622 |
1623 | Redistribution and use in source and binary forms, with or without
1624 | modification, are permitted provided that the following conditions are met:
1625 |
1626 | Redistributions of source code must retain the above copyright notice, this list of
1627 | conditions and the following disclaimer. Redistributions in binary form must reproduce
1628 | the above copyright notice, this list of conditions and the following disclaimer in
1629 | the documentation and/or other materials provided with the distribution.
1630 |
1631 | Neither the name of XStream nor the names of its contributors may be used to endorse
1632 | or promote products derived from this software without specific prior written
1633 | permission.
1634 |
1635 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
1636 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1637 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
1638 | SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
1639 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
1640 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
1641 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1642 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
1643 | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1644 | DAMAGE.
1645 |
1646 | ################################################################################
1647 |
1648 | activation v1.1.1
1649 | ==========
1650 | and
1651 | mail v1.4.4
1652 | ====
1653 |
1654 | JMeter includes the activation and mail jars under the CDDL license V1.0
1655 |
1656 | Here follows the original dual license for the activation and mail jars:
1657 |
1658 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
1659 |
1660 | 1. Definitions.
1661 |
1662 | 1.1. Contributor. means each individual or entity that creates or contributes to the creation of Modifications.
1663 |
1664 | 1.2. Contributor Version. means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
1665 |
1666 | 1.3. Covered Software. means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
1667 |
1668 | 1.4. Executable. means the Covered Software in any form other than Source Code.
1669 |
1670 | 1.5. Initial Developer. means the individual or entity that first makes Original Software available under this License.
1671 |
1672 | 1.6. Larger Work. means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
1673 |
1674 | 1.7. License. means this document.
1675 |
1676 | 1.8. Licensable. means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
1677 |
1678 | 1.9. Modifications. means the Source Code and Executable form of any of the following:
1679 |
1680 | A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
1681 |
1682 | B. Any new file that contains any part of the Original Software or previous Modification; or
1683 |
1684 | C. Any new file that is contributed or otherwise made available under the terms of this License.
1685 |
1686 | 1.10. Original Software. means the Source Code and Executable form of computer software code that is originally released under this License.
1687 |
1688 | 1.11. Patent Claims. means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
1689 |
1690 | 1.12. Source Code. means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
1691 |
1692 | 1.13. You. (or .Your.) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, .You. includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, .control. means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
1693 |
1694 | 2. License Grants.
1695 |
1696 | 2.1. The Initial Developer Grant.
1697 |
1698 | Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
1699 |
1700 | (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
1701 |
1702 | (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
1703 |
1704 | (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
1705 |
1706 | (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
1707 |
1708 | 2.2. Contributor Grant.
1709 |
1710 | Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
1711 |
1712 | (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
1713 |
1714 | (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
1715 |
1716 | (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
1717 |
1718 | (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
1719 |
1720 | 3. Distribution Obligations.
1721 |
1722 | 3.1. Availability of Source Code.
1723 | Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
1724 |
1725 | 3.2. Modifications.
1726 | The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
1727 |
1728 | 3.3. Required Notices.
1729 | You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
1730 |
1731 | 3.4. Application of Additional Terms.
1732 | You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients. rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
1733 |
1734 | 3.5. Distribution of Executable Versions.
1735 | You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient.s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
1736 |
1737 | 3.6. Larger Works.
1738 | You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
1739 |
1740 | 4. Versions of the License.
1741 |
1742 | 4.1. New Versions.
1743 | Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
1744 |
1745 | 4.2. Effect of New Versions.
1746 | You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
1747 |
1748 | 4.3. Modified Versions.
1749 | When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
1750 |
1751 | 5. DISCLAIMER OF WARRANTY.
1752 |
1753 | COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
1754 |
1755 | 6. TERMINATION.
1756 |
1757 | 6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
1758 |
1759 | 6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as .Participant.) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
1760 |
1761 | 6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
1762 |
1763 | 7. LIMITATION OF LIABILITY.
1764 |
1765 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
1766 |
1767 | 8. U.S. GOVERNMENT END USERS.
1768 |
1769 | The Covered Software is a commercial item,. as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as that term is defined at 48 C.F.R. º 252.227-7014(a)(1)) and .commercial computer software documentation. as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
1770 |
1771 | 9. MISCELLANEOUS.
1772 |
1773 | This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction.s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys. fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
1774 |
1775 | 10. RESPONSIBILITY FOR CLAIMS.
1776 |
1777 | As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
1778 |
1779 | NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
1780 |
1781 | The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
1782 |
1783 |
1784 | The GNU General Public License (GPL) Version 2, June 1991
1785 |
1786 |
1787 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1788 |
1789 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
1790 |
1791 | Preamble
1792 |
1793 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
1794 |
1795 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
1796 |
1797 | To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
1798 |
1799 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
1800 |
1801 | We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
1802 |
1803 | Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
1804 |
1805 | Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
1806 |
1807 | The precise terms and conditions for copying, distribution and modification follow.
1808 |
1809 |
1810 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1811 |
1812 | 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
1813 |
1814 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1815 |
1816 | 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
1817 |
1818 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
1819 |
1820 | 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
1821 |
1822 | a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
1823 |
1824 | b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
1825 |
1826 | c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
1827 |
1828 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
1829 |
1830 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
1831 |
1832 | In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
1833 |
1834 | 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
1835 |
1836 | a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
1837 |
1838 | b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
1839 |
1840 | c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
1841 |
1842 | The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
1843 |
1844 | If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
1845 |
1846 | 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
1847 |
1848 | 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
1849 |
1850 | 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
1851 |
1852 | 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
1853 |
1854 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
1855 |
1856 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
1857 |
1858 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
1859 |
1860 | 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
1861 |
1862 | 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
1863 |
1864 | Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
1865 |
1866 | 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
1867 |
1868 | NO WARRANTY
1869 |
1870 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1871 |
1872 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1873 |
1874 | END OF TERMS AND CONDITIONS
1875 |
1876 |
1877 | How to Apply These Terms to Your New Programs
1878 |
1879 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
1880 |
1881 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
1882 |
1883 | One line to give the program's name and a brief idea of what it does.
1884 |
1885 | Copyright (C)
1886 |
1887 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
1888 |
1889 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1890 |
1891 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1892 |
1893 | Also add information on how to contact you by electronic and paper mail.
1894 |
1895 | If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
1896 |
1897 | Gnomovision version 69, Copyright (C) year name of author
1898 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
1899 |
1900 | The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
1901 |
1902 | You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
1903 |
1904 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
1905 |
1906 | signature of Ty Coon, 1 April 1989
1907 | Ty Coon, President of Vice
1908 |
1909 | This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
1910 |
1911 |
1912 | "CLASSPATH" EXCEPTION TO THE GPL VERSION 2
1913 |
1914 | Certain source files distributed by Sun Microsystems, Inc. are subject to the following clarification and special exception to the GPL Version 2, but only where Sun has expressly included in the particular source file's header the words
1915 |
1916 | "Sun designates this particular file as subject to the "Classpath" exception as provided by Sun in the License file that accompanied this code."
1917 |
1918 | Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License Version 2 cover the whole combination.
1919 |
1920 | As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module.? An independent module is a module which is not derived from or based on this library.? If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so.? If you do not wish to do so, delete this exception statement from your version.
1921 |
1922 | ################################################################################
1923 |
--------------------------------------------------------------------------------