@Override public WireFormat createWireFormat() { StompWireFormat wireFormat = new StompWireFormat(); wireFormat.setMaxDataLength(getMaxDataLength()); wireFormat.setMaxFrameSize(getMaxFrameSize()); return wireFormat; }
@Override protected Transport createTransport(Socket socket, WireFormat format) throws IOException { StompNIOSSLTransport transport = new StompNIOSSLTransport(format, socket); if (context != null) { transport.setSslContext(context); } transport.setNeedClientAuth(isNeedClientAuth()); transport.setWantClientAuth(isWantClientAuth()); return transport; } };
public void startMonitoring() throws IOException { this.isConfigured = true; stopConnectCheckTask(); startMonitorThreads(); }
public void unsubscribe(String destination, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); StompFrame frame = new StompFrame("UNSUBSCRIBE", headers); sendFrame(frame.format()); }
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, JMSException { ActiveMQMessage msg = findTranslator(command.getHeaders().get(Stomp.Headers.TRANSFORMATION)).convertFrame(this, command); return msg; }
@Override protected Transport createInactivityMonitor(Transport transport, WireFormat format) { StompInactivityMonitor monitor = new StompInactivityMonitor(transport, format); StompTransportFilter filter = (StompTransportFilter) transport.narrow(StompTransportFilter.class); filter.setInactivityMonitor(monitor); return monitor; } }
public StompTransportFilter(Transport next, WireFormat wireFormat, BrokerContext brokerContext) { super(next); this.protocolConverter = new ProtocolConverter(this, brokerContext); if (wireFormat instanceof StompWireFormat) { this.wireFormat = (StompWireFormat) wireFormat; } }
@Override public TcpTransport createTransport(WireFormat wireFormat, Socket socket, InitBuffer initBuffer) throws IOException { return new StompNIOTransport(wireFormat, socket, initBuffer); }
@Override public TcpTransport createTransport(WireFormat wireFormat, Socket socket, SSLEngine engine, InitBuffer initBuffer, ByteBuffer inputBuffer) throws IOException { return new StompNIOSSLTransport(wireFormat, socket, engine, initBuffer, inputBuffer); }
/** * Returns the currently configured Read check grace period multiplier. * * @return the hbGracePeriodMultiplier */ public float getHbGracePeriodMultiplier() { return protocolConverter != null ? protocolConverter.getHbGracePeriodMultiplier() : null; }
@Override protected Transport createTransport(Socket socket, WireFormat format) throws IOException { StompNIOSSLTransport transport = new StompNIOSSLTransport(format, socket); if (context != null) { transport.setSslContext(context); } transport.setNeedClientAuth(isNeedClientAuth()); transport.setWantClientAuth(isWantClientAuth()); return transport; } };
@Override public WireFormat createWireFormat() { StompWireFormat wireFormat = new StompWireFormat(); wireFormat.setMaxDataLength(getMaxDataLength()); wireFormat.setMaxFrameSize(getMaxFrameSize()); return wireFormat; }
public void abort(String transaction) throws Exception { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("transaction", transaction); StompFrame frame = new StompFrame("ABORT", headers); sendFrame(frame.format()); }
public void startMonitoring() throws IOException { this.isConfigured = true; stopConnectCheckTask(); startMonitorThreads(); }
@Override protected Transport createInactivityMonitor(Transport transport, WireFormat format) { StompInactivityMonitor monitor = new StompInactivityMonitor(transport, format); StompTransportFilter filter = (StompTransportFilter) transport.narrow(StompTransportFilter.class); filter.setInactivityMonitor(monitor); return monitor; } }
public StompTransportFilter(Transport next, WireFormat wireFormat, BrokerContext brokerContext) { super(next); this.protocolConverter = new ProtocolConverter(this, brokerContext); if (wireFormat instanceof StompWireFormat) { this.wireFormat = (StompWireFormat) wireFormat; } }
@Override public TcpTransport createTransport(WireFormat wireFormat, Socket socket, SSLEngine engine, InitBuffer initBuffer, ByteBuffer inputBuffer) throws IOException { return new StompNIOSSLTransport(wireFormat, socket, engine, initBuffer, inputBuffer); }
@Override protected Transport createTransport(Socket socket, WireFormat format) throws IOException { StompNIOSSLTransport transport = new StompNIOSSLTransport(format, socket); if (context != null) { transport.setSslContext(context); } transport.setNeedClientAuth(isNeedClientAuth()); transport.setWantClientAuth(isWantClientAuth()); return transport; } };
@Override public WireFormat createWireFormat() { StompWireFormat wireFormat = new StompWireFormat(); wireFormat.setMaxDataLength(getMaxDataLength()); wireFormat.setMaxFrameSize(getMaxFrameSize()); return wireFormat; }
public void subscribe(String destination, String ack, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (ack != null) { headers.put("ack", ack); } StompFrame frame = new StompFrame("SUBSCRIBE", headers); sendFrame(frame.format()); }