public class SseEmitter<ACCESS_USER extends AccessUser & AccessToken>
extends org.springframework.web.servlet.mvc.method.annotation.SseEmitter
| 构造器和说明 |
|---|
SseEmitter(Long timeout)
timeout = 0是永不过期
|
SseEmitter(Long timeout,
ACCESS_USER accessUser)
timeout = 0是永不过期
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConnectListener(Consumer<SseEmitter<ACCESS_USER>> consumer) |
void |
addDisConnectListener(Consumer<SseEmitter<ACCESS_USER>> consumer) |
boolean |
disconnect() |
boolean |
equals(Object obj) |
static org.springframework.web.servlet.mvc.method.annotation.SseEmitter.SseEventBuilder |
event() |
String |
getAccessToken() |
ACCESS_USER |
getAccessUser() |
<T> T |
getAttribute(String key) |
Map<String,Object> |
getAttributeMap() |
String |
getChannel() |
int |
getCount() |
long |
getCreateTime() |
Object |
getCustomerId() |
long |
getId() |
Object |
getUserId() |
int |
hashCode() |
boolean |
isConnect() |
boolean |
isDisconnect() |
<T> T |
removeAttribute(String key) |
void |
send(org.springframework.web.servlet.mvc.method.annotation.SseEmitter.SseEventBuilder builder) |
<T> T |
setAttribute(String key,
Object value) |
void |
setChannel(String channel) |
String |
toString() |
public SseEmitter(Long timeout)
public SseEmitter(Long timeout, ACCESS_USER accessUser)
public static org.springframework.web.servlet.mvc.method.annotation.SseEmitter.SseEventBuilder event()
public int getCount()
public long getCreateTime()
public long getId()
public Object getUserId()
public String getAccessToken()
public Object getCustomerId()
public ACCESS_USER getAccessUser()
public <T> T getAttribute(String key)
public <T> T removeAttribute(String key)
public String getChannel()
public void setChannel(String channel)
public boolean isConnect()
public void addConnectListener(Consumer<SseEmitter<ACCESS_USER>> consumer)
public void addDisConnectListener(Consumer<SseEmitter<ACCESS_USER>> consumer)
public void send(org.springframework.web.servlet.mvc.method.annotation.SseEmitter.SseEventBuilder builder)
throws IOException
send 在类中 org.springframework.web.servlet.mvc.method.annotation.SseEmitterIOExceptionpublic boolean isDisconnect()
public boolean disconnect()
public String toString()
toString 在类中 org.springframework.web.servlet.mvc.method.annotation.SseEmitterCopyright © 2022. All rights reserved.