Repository: qpid-jms Updated Branches: refs/heads/master 7b601d237 -> 470c87aeb
Add a NoOpAsyncResult class to use for out of band async operation where we don't care about the end result. Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/470c87ae Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/470c87ae Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/470c87ae Branch: refs/heads/master Commit: 470c87aebb1801db90f7b57eeb3472eea1031a4c Parents: a0c76f6 Author: Timothy Bish <tabish...@gmail.com> Authored: Tue Oct 28 17:10:15 2014 -0400 Committer: Timothy Bish <tabish...@gmail.com> Committed: Tue Oct 28 17:14:06 2014 -0400 ---------------------------------------------------------------------- .../qpid/jms/provider/NoOpAsyncResult.java | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/470c87ae/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/NoOpAsyncResult.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/NoOpAsyncResult.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/NoOpAsyncResult.java new file mode 100644 index 0000000..3ee6183 --- /dev/null +++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/NoOpAsyncResult.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.qpid.jms.provider; + +/** + * Simple NoOp implementation used when the result of the operation does not matter. + */ +public class NoOpAsyncResult implements AsyncResult { + + public static NoOpAsyncResult INSTANCE = new NoOpAsyncResult(); + + @Override + public void onFailure(Throwable result) { + + } + + @Override + public void onSuccess() { + + } + + @Override + public boolean isComplete() { + return true; + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org