001/** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.activemq.state; 018 019import org.apache.activemq.command.BrokerInfo; 020import org.apache.activemq.command.ConnectionControl; 021import org.apache.activemq.command.ConnectionError; 022import org.apache.activemq.command.ConnectionId; 023import org.apache.activemq.command.ConnectionInfo; 024import org.apache.activemq.command.ConsumerControl; 025import org.apache.activemq.command.ConsumerId; 026import org.apache.activemq.command.ConsumerInfo; 027import org.apache.activemq.command.ControlCommand; 028import org.apache.activemq.command.DestinationInfo; 029import org.apache.activemq.command.FlushCommand; 030import org.apache.activemq.command.KeepAliveInfo; 031import org.apache.activemq.command.Message; 032import org.apache.activemq.command.MessageAck; 033import org.apache.activemq.command.MessageDispatch; 034import org.apache.activemq.command.MessageDispatchNotification; 035import org.apache.activemq.command.MessagePull; 036import org.apache.activemq.command.ProducerAck; 037import org.apache.activemq.command.ProducerId; 038import org.apache.activemq.command.ProducerInfo; 039import org.apache.activemq.command.RemoveSubscriptionInfo; 040import org.apache.activemq.command.Response; 041import org.apache.activemq.command.SessionId; 042import org.apache.activemq.command.SessionInfo; 043import org.apache.activemq.command.ShutdownInfo; 044import org.apache.activemq.command.TransactionInfo; 045import org.apache.activemq.command.WireFormatInfo; 046 047public interface CommandVisitor { 048 049 Response processAddConnection(ConnectionInfo info) throws Exception; 050 051 Response processAddSession(SessionInfo info) throws Exception; 052 053 Response processAddProducer(ProducerInfo info) throws Exception; 054 055 Response processAddConsumer(ConsumerInfo info) throws Exception; 056 057 Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception; 058 059 Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception; 060 061 Response processRemoveProducer(ProducerId id) throws Exception; 062 063 Response processRemoveConsumer(ConsumerId id, long lastDeliveredSequenceId) throws Exception; 064 065 Response processAddDestination(DestinationInfo info) throws Exception; 066 067 Response processRemoveDestination(DestinationInfo info) throws Exception; 068 069 Response processRemoveSubscription(RemoveSubscriptionInfo info) throws Exception; 070 071 Response processMessage(Message send) throws Exception; 072 073 Response processMessageAck(MessageAck ack) throws Exception; 074 075 Response processMessagePull(MessagePull pull) throws Exception; 076 077 Response processBeginTransaction(TransactionInfo info) throws Exception; 078 079 Response processPrepareTransaction(TransactionInfo info) throws Exception; 080 081 Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception; 082 083 Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception; 084 085 Response processRollbackTransaction(TransactionInfo info) throws Exception; 086 087 Response processWireFormat(WireFormatInfo info) throws Exception; 088 089 Response processKeepAlive(KeepAliveInfo info) throws Exception; 090 091 Response processShutdown(ShutdownInfo info) throws Exception; 092 093 Response processFlush(FlushCommand command) throws Exception; 094 095 Response processBrokerInfo(BrokerInfo info) throws Exception; 096 097 Response processRecoverTransactions(TransactionInfo info) throws Exception; 098 099 Response processForgetTransaction(TransactionInfo info) throws Exception; 100 101 Response processEndTransaction(TransactionInfo info) throws Exception; 102 103 Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception; 104 105 Response processProducerAck(ProducerAck ack) throws Exception; 106 107 Response processMessageDispatch(MessageDispatch dispatch) throws Exception; 108 109 Response processControlCommand(ControlCommand command) throws Exception; 110 111 Response processConnectionError(ConnectionError error) throws Exception; 112 113 Response processConnectionControl(ConnectionControl control) throws Exception; 114 115 Response processConsumerControl(ConsumerControl control) throws Exception; 116 117}