summaryrefslogtreecommitdiff
path: root/java/newclient/src/main/java/org/apache/qpid/nclient/core/Phase.java
blob: 7aa10b77fff8cf762f0ad29b2777561ad53104af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.apache.qpid.nclient.core;


public interface Phase 
{

    	/**
    	 * This method is used to initialize a phase 
    	 * 
    	 * @param ctx
    	 * @param nextInFlowPhase
    	 * @param nextOutFlowPhase
    	 */
	public void init(PhaseContext ctx,Phase nextInFlowPhase, Phase nextOutFlowPhase);

	/**
	 * 
	 * Implement logic related to physical opening
	 * of the pipe
	 */
	public void start()throws AMQPException;
	
	/**
	 * Implement cleanup in this method.
	 * This indicates the pipe is closing
	 */
	public void close()throws AMQPException;
	
	public void messageReceived(Object msg) throws AMQPException;
	
	public void messageSent(Object msg) throws AMQPException;
	
	public PhaseContext getPhaseContext();
	
	public Phase getNextOutFlowPhase();
	
	public Phase getNextInFlowPhase();
}