Class StompConnection
- java.lang.Object
-
- org.apache.activemq.transport.stomp.StompConnection
-
public class StompConnection extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static longRECEIVE_TIMEOUT
-
Constructor Summary
Constructors Constructor Description StompConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(String transaction)voidack(String messageId)voidack(String messageId, String transaction)voidack(StompFrame frame)voidack(StompFrame frame, String transaction)protected StringappendHeaders(HashMap<String,Object> headers)voidbegin(String transaction)voidclose()voidcommit(String transaction)voidconnect(String username, String password)voidconnect(String username, String password, String client)voidconnect(HashMap<String,String> headers)voiddisconnect()voiddisconnect(String receiptId)SocketgetStompSocket()StringgetVersion()voidkeepAlive()voidopen(String host, int port)voidopen(Socket socket)StompFramereceive()StompFramereceive(long timeOut)StringreceiveFrame()StringreceiveFrame(long timeOut)voidsend(String destination, String message)voidsend(String destination, String message, String transaction, HashMap<String,String> headers)voidsendFrame(String data)voidsendFrame(String frame, byte[] data)voidsetStompSocket(Socket stompSocket)voidsetVersion(String version)voidsubscribe(String destination)voidsubscribe(String destination, String ack)voidsubscribe(String destination, String ack, HashMap<String,String> headers)voidunsubscribe(String destination)voidunsubscribe(String destination, HashMap<String,String> headers)
-
-
-
Field Detail
-
RECEIVE_TIMEOUT
public static final long RECEIVE_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public void open(String host, int port) throws IOException, UnknownHostException
- Throws:
IOExceptionUnknownHostException
-
open
public void open(Socket socket)
-
close
public void close() throws IOException- Throws:
IOException
-
receive
public StompFrame receive() throws Exception
- Throws:
Exception
-
receive
public StompFrame receive(long timeOut) throws Exception
- Throws:
Exception
-
getStompSocket
public Socket getStompSocket()
-
setStompSocket
public void setStompSocket(Socket stompSocket)
-
connect
public void connect(String username, String password, String client) throws Exception
- Throws:
Exception
-
send
public void send(String destination, String message, String transaction, HashMap<String,String> headers) throws Exception
- Throws:
Exception
-
subscribe
public void subscribe(String destination, String ack, HashMap<String,String> headers) throws Exception
- Throws:
Exception
-
unsubscribe
public void unsubscribe(String destination, HashMap<String,String> headers) throws Exception
- Throws:
Exception
-
ack
public void ack(StompFrame frame) throws Exception
- Throws:
Exception
-
ack
public void ack(StompFrame frame, String transaction) throws Exception
- Throws:
Exception
-
getVersion
public String getVersion()
-
setVersion
public void setVersion(String version)
-
-