public class SubscriptionDataFetcherProxy extends Object implements graphql.schema.DataFetcher
| 限定符和类型 | 字段和说明 |
|---|---|
static Map<String,List<io.reactivex.ObservableEmitter<Object>>> |
TOPIC_EMITTERS_MAP
存放各个个会话列表的Map
key: topicName
|
| 构造器和说明 |
|---|
SubscriptionDataFetcherProxy() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
get(graphql.schema.DataFetchingEnvironment environment)
This is called by the graphql engine to fetch the value.
|
String |
getTopicName() |
static void |
removeEmitter(io.reactivex.ObservableEmitter<Object> emitter) |
void |
setTopicName(String topicName) |
public Object get(graphql.schema.DataFetchingEnvironment environment) throws Exception
DataFetchingEnvironment is a composite
context object that tells you all you need to know about how to fetch a data value in graphql type terms.get 在接口中 graphql.schema.DataFetcherenvironment - this is the data fetching environment which contains all the context you need to fetch a valueDataFetcherResultException - to relieve the implementations from having to wrap checked exceptions. Any exception thrown
from a DataFetcher will eventually be handled by the registered DataFetcherExceptionHandler
and the related field will have a value of null in the result.public String getTopicName()
public void setTopicName(String topicName)
public static void removeEmitter(io.reactivex.ObservableEmitter<Object> emitter)
Copyright © 2020. All rights reserved.