Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package broker.model;
- import approval.model.ApprovalReply;
- import client.model.MessageReceiverGateway;
- import client.model.MessageSenderGateway;
- import client.model.TravelRefundReply;
- import client.model.TravelRefundRequest;
- import net.sourceforge.jeval.EvaluationException;
- import javax.jms.JMSException;
- import java.io.IOException;
- public abstract class ClientAppGateway {
- protected MessageSenderGateway sender;
- protected MessageReceiverGateway receiver;
- protected Serializer serializer;
- protected ClientAppGateway(String queueNameSend, String queueNameReceive){
- sender = new MessageSenderGateway(queueNameSend);
- receiver = new MessageReceiverGateway(queueNameReceive);
- serializer = new Serializer();
- }
- //used to perform some actions when a TravelRefundRequest is arrived
- public abstract void onTravelRefundRequestArrivedToBroker(TravelRefundRequest travelRefundRequest) throws JMSException, IOException, EvaluationException;
- //used to perform some actions when an ApprovalReply is arrived
- public abstract void onApprovalReplyArrivedToBroker(ApprovalReply approvalReply) throws JMSException, EvaluationException;
- //send a TravelRefundReply
- public abstract void sendTravelRefundReply(TravelRefundReply travelRefundReply) throws JMSException;
- //listen for messages
- public abstract void receiverSetListener() throws JMSException;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement