类的使用
org.springframework.messaging.simp.stomp.StompHeaders
使用StompHeaders的程序包 程序包 说明 org.springframework.messaging.simp.stomp Generic support for simple messaging protocols (like STOMP).org.springframework.web.socket.messaging WebSocket integration for Spring's messaging module.org.springframework.messaging.simp.stomp中StompHeaders的使用
返回StompHeaders的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 StompHeadersStompSession.Subscription. getSubscriptionHeaders()Return the headers used on the SUBSCRIBE frame.protected StompHeadersStompClientSupport. processConnectHeaders(StompHeaders connectHeaders)Further initialize the StompHeaders, for example setting the heart-beat header if necessary.static StompHeadersStompHeaders. readOnlyStompHeaders(Map<String,List<String>> headers)Return aStompHeadersobject that can only be read, not written to.参数类型为StompHeaders的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 StompSession.ReceiptableDefaultStompSession. acknowledge(StompHeaders headers, boolean consumed)StompSession.ReceiptableStompSession. acknowledge(StompHeaders headers, boolean consumed)An overloaded version ofStompSession.acknowledge(String, boolean)with fullStompHeadersinstead of just amessageId.voidStompSessionHandler. afterConnected(StompSession session, StompHeaders connectedHeaders)Invoked when the session is ready to use, i.e. after the underlying transport (TCP, WebSocket) is connected and a STOMP CONNECTED frame is received from the broker.voidStompSessionHandlerAdapter. afterConnected(StompSession session, StompHeaders connectedHeaders)This implementation is empty.ListenableFuture<StompSession>ReactorNettyTcpStompClient. connect(StompHeaders connectHeaders, StompSessionHandler handler)An overloaded version ofReactorNettyTcpStompClient.connect(StompSessionHandler)that accepts headers to use for the STOMP CONNECT frame.protected ConnectionHandlingStompSessionStompClientSupport. createSession(StompHeaders connectHeaders, StompSessionHandler handler)Factory method for create and configure a new session.voidDefaultStompSession. disconnect(StompHeaders headers)voidStompSession. disconnect(StompHeaders headers)Variant ofStompSession.disconnect()with headers.TypeStompFrameHandler. getPayloadType(StompHeaders headers)Invoked beforeStompFrameHandler.handleFrame(StompHeaders, Object)to determine the type of Object the payload should be converted to.TypeStompSessionHandlerAdapter. getPayloadType(StompHeaders headers)This implementation returns String as the expected payload type for STOMP ERROR frames.voidStompSessionHandler. handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)Handle any exception arising while processing a STOMP frame such as a failure to convert the payload or an unhandled exception in the applicationStompFrameHandler.voidStompSessionHandlerAdapter. handleException(StompSession session, StompCommand command, StompHeaders headers, byte[] payload, Throwable exception)This implementation is empty.voidStompFrameHandler. handleFrame(StompHeaders headers, Object payload)Handle a STOMP frame with the payload converted to the target type returned fromStompFrameHandler.getPayloadType(StompHeaders).voidStompSessionHandlerAdapter. handleFrame(StompHeaders headers, Object payload)This implementation is empty.protected StompHeadersStompClientSupport. processConnectHeaders(StompHeaders connectHeaders)Further initialize the StompHeaders, for example setting the heart-beat header if necessary.StompSession.ReceiptableDefaultStompSession. send(StompHeaders headers, Object payload)StompSession.ReceiptableStompSession. send(StompHeaders headers, Object payload)An overloaded version ofStompSession.send(String, Object)with fullStompHeadersinstead of just a destination.StompSession.SubscriptionDefaultStompSession. subscribe(StompHeaders headers, StompFrameHandler handler)StompSession.SubscriptionStompSession. subscribe(StompHeaders headers, StompFrameHandler handler)An overloaded version ofStompSession.subscribe(String, StompFrameHandler)with fullStompHeadersinstead of just a destination.voidStompSession.Subscription. unsubscribe(StompHeaders headers)Alternative toStompSession.Subscription.unsubscribe()with additional custom headers to send to the server.参数类型为StompHeaders的org.springframework.messaging.simp.stomp中的构造器 构造器 说明 DefaultStompSession(StompSessionHandler sessionHandler, StompHeaders connectHeaders)Create a new session.org.springframework.web.socket.messaging中StompHeaders的使用
返回StompHeaders的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 protected StompHeadersWebSocketStompClient. processConnectHeaders(StompHeaders connectHeaders)参数类型为StompHeaders的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 ListenableFuture<StompSession>WebSocketStompClient. connect(String url, WebSocketHttpHeaders handshakeHeaders, StompHeaders connectHeaders, StompSessionHandler handler, Object... uriVariables)An overloaded version ofWebSocketStompClient.connect(String, StompSessionHandler, Object...)that also acceptsWebSocketHttpHeadersto use for the WebSocket handshake andStompHeadersfor the STOMP CONNECT frame.ListenableFuture<StompSession>WebSocketStompClient. connect(URI url, WebSocketHttpHeaders handshakeHeaders, StompHeaders connectHeaders, StompSessionHandler sessionHandler)An overloaded version ofWebSocketStompClient.connect(String, WebSocketHttpHeaders, StompSessionHandler, Object...)that accepts a fully preparedURI.protected StompHeadersWebSocketStompClient. processConnectHeaders(StompHeaders connectHeaders)