Package com.alibaba.spring.boot.rsocket
Class RSocketRequesterSupportImpl
- java.lang.Object
-
- com.alibaba.spring.boot.rsocket.RSocketRequesterSupportImpl
-
- All Implemented Interfaces:
RSocketRequesterSupport,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class RSocketRequesterSupportImpl extends Object implements RSocketRequesterSupport, org.springframework.context.ApplicationContextAware
RSocket Requester Support implementation: setup payload, published service, token and app info- Author:
- leijuan
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationContextapplicationContextprotected StringappNameprotected Propertiesenvprotected char[]jwtTokenprotected RSocketPropertiespropertiesprotected List<io.rsocket.plugins.RSocketInterceptor>requestInterceptorsprotected List<io.rsocket.plugins.RSocketInterceptor>responderInterceptorsprotected io.rsocket.SocketAcceptorsocketAcceptor
-
Constructor Summary
Constructors Constructor Description RSocketRequesterSupportImpl(RSocketProperties properties, Properties env, io.rsocket.SocketAcceptor socketAcceptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRequesterInterceptor(io.rsocket.plugins.RSocketInterceptor interceptor)voidaddResponderInterceptor(io.rsocket.plugins.RSocketInterceptor interceptor)Supplier<Set<ServiceLocator>>exposedServices()StringinputStreamToString(InputStream inputStream)URIoriginUri()List<io.rsocket.plugins.RSocketInterceptor>requestInterceptors()List<io.rsocket.plugins.RSocketInterceptor>responderInterceptors()Supplier<CloudEventImpl<ServicesExposedEvent>>servicesExposedEvent()voidsetApplicationContext(@NotNull org.springframework.context.ApplicationContext applicationContext)Supplier<io.rsocket.Payload>setupPayload(String serviceId)io.rsocket.SocketAcceptorsocketAcceptor()Supplier<Set<ServiceLocator>>subscribedServices()
-
-
-
Field Detail
-
env
protected Properties env
-
properties
protected RSocketProperties properties
-
appName
protected String appName
-
jwtToken
protected char[] jwtToken
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
socketAcceptor
protected io.rsocket.SocketAcceptor socketAcceptor
-
responderInterceptors
protected List<io.rsocket.plugins.RSocketInterceptor> responderInterceptors
-
requestInterceptors
protected List<io.rsocket.plugins.RSocketInterceptor> requestInterceptors
-
-
Constructor Detail
-
RSocketRequesterSupportImpl
public RSocketRequesterSupportImpl(RSocketProperties properties, Properties env, io.rsocket.SocketAcceptor socketAcceptor)
-
-
Method Detail
-
originUri
public URI originUri()
- Specified by:
originUriin interfaceRSocketRequesterSupport
-
setupPayload
public Supplier<io.rsocket.Payload> setupPayload(String serviceId)
- Specified by:
setupPayloadin interfaceRSocketRequesterSupport
-
exposedServices
public Supplier<Set<ServiceLocator>> exposedServices()
- Specified by:
exposedServicesin interfaceRSocketRequesterSupport
-
subscribedServices
public Supplier<Set<ServiceLocator>> subscribedServices()
- Specified by:
subscribedServicesin interfaceRSocketRequesterSupport
-
servicesExposedEvent
public Supplier<CloudEventImpl<ServicesExposedEvent>> servicesExposedEvent()
- Specified by:
servicesExposedEventin interfaceRSocketRequesterSupport
-
socketAcceptor
public io.rsocket.SocketAcceptor socketAcceptor()
- Specified by:
socketAcceptorin interfaceRSocketRequesterSupport
-
responderInterceptors
public List<io.rsocket.plugins.RSocketInterceptor> responderInterceptors()
- Specified by:
responderInterceptorsin interfaceRSocketRequesterSupport
-
addResponderInterceptor
public void addResponderInterceptor(io.rsocket.plugins.RSocketInterceptor interceptor)
-
requestInterceptors
public List<io.rsocket.plugins.RSocketInterceptor> requestInterceptors()
- Specified by:
requestInterceptorsin interfaceRSocketRequesterSupport
-
addRequesterInterceptor
public void addRequesterInterceptor(io.rsocket.plugins.RSocketInterceptor interceptor)
-
setApplicationContext
public void setApplicationContext(@NotNull @NotNull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
inputStreamToString
public String inputStreamToString(InputStream inputStream)
-
-