org.apache.activemq.transport.stomp
Class StompConnection

java.lang.Object
  extended by org.apache.activemq.transport.stomp.StompConnection

public class StompConnection
extends Object


Field Summary
static long RECEIVE_TIMEOUT
           
 
Constructor Summary
StompConnection()
           
 
Method Summary
 void abort(String transaction)
           
 void ack(StompFrame frame)
           
 void ack(StompFrame frame, String transaction)
           
 void ack(String messageId)
           
 void ack(String messageId, String transaction)
           
protected  String appendHeaders(HashMap<String,Object> headers)
           
 void begin(String transaction)
           
 void close()
           
 void commit(String transaction)
           
 void connect(HashMap<String,String> headers)
           
 void connect(String username, String password)
           
 void connect(String username, String password, String client)
           
 void disconnect()
           
 void disconnect(String receiptId)
           
 Socket getStompSocket()
           
 String getVersion()
           
 void keepAlive()
           
 void open(Socket socket)
           
 void open(String host, int port)
           
 StompFrame receive()
           
 StompFrame receive(long timeOut)
           
 String receiveFrame()
           
 String receiveFrame(long timeOut)
           
 void send(String destination, String message)
           
 void send(String destination, String message, String transaction, HashMap<String,String> headers)
           
 void sendFrame(String data)
           
 void sendFrame(String frame, byte[] data)
           
 void setStompSocket(Socket stompSocket)
           
 void setVersion(String version)
           
 void subscribe(String destination)
           
 void subscribe(String destination, String ack)
           
 void subscribe(String destination, String ack, HashMap<String,String> headers)
           
 void unsubscribe(String destination)
           
 void unsubscribe(String destination, HashMap<String,String> headers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECEIVE_TIMEOUT

public static final long RECEIVE_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

StompConnection

public StompConnection()
Method Detail

open

public void open(String host,
                 int port)
          throws IOException,
                 UnknownHostException
Throws:
IOException
UnknownHostException

open

public void open(Socket socket)

close

public void close()
           throws IOException
Throws:
IOException

sendFrame

public void sendFrame(String data)
               throws Exception
Throws:
Exception

sendFrame

public void sendFrame(String frame,
                      byte[] data)
               throws Exception
Throws:
Exception

receive

public StompFrame receive()
                   throws Exception
Throws:
Exception

receive

public StompFrame receive(long timeOut)
                   throws Exception
Throws:
Exception

receiveFrame

public String receiveFrame()
                    throws Exception
Throws:
Exception

receiveFrame

public String receiveFrame(long timeOut)
                    throws Exception
Throws:
Exception

getStompSocket

public Socket getStompSocket()

setStompSocket

public void setStompSocket(Socket stompSocket)

connect

public void connect(String username,
                    String password)
             throws Exception
Throws:
Exception

connect

public void connect(String username,
                    String password,
                    String client)
             throws Exception
Throws:
Exception

connect

public void connect(HashMap<String,String> headers)
             throws Exception
Throws:
Exception

disconnect

public void disconnect()
                throws Exception
Throws:
Exception

disconnect

public void disconnect(String receiptId)
                throws Exception
Throws:
Exception

send

public void send(String destination,
                 String message)
          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)
               throws Exception
Throws:
Exception

subscribe

public void subscribe(String destination,
                      String ack)
               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)
                 throws Exception
Throws:
Exception

unsubscribe

public void unsubscribe(String destination,
                        HashMap<String,String> headers)
                 throws Exception
Throws:
Exception

begin

public void begin(String transaction)
           throws Exception
Throws:
Exception

abort

public void abort(String transaction)
           throws Exception
Throws:
Exception

commit

public void commit(String transaction)
            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

ack

public void ack(String messageId)
         throws Exception
Throws:
Exception

ack

public void ack(String messageId,
                String transaction)
         throws Exception
Throws:
Exception

keepAlive

public void keepAlive()
               throws Exception
Throws:
Exception

appendHeaders

protected String appendHeaders(HashMap<String,Object> headers)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.