Clover icon

sunshower-sdk

  1. Project Clover database Sat May 12 2018 05:15:40 UTC
  2. Package io.sunshower.sdk.channel

File Channels.java

 

Coverage histogram

../../../../img/srcFileCovDistChart0.png
40% of files have more coverage

Code metrics

0
2
1
1
22
17
1
0.5
2
1
1

Classes

Class Line # Actions
Channels 12 2 1
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.sdk.channel;
2   
3    import org.jboss.resteasy.spi.ResteasyProviderFactory;
4    import org.reactivestreams.Subscriber;
5    import org.reactivestreams.Subscription;
6   
7    import javax.ws.rs.core.MediaType;
8    import javax.ws.rs.sse.Sse;
9    import javax.ws.rs.sse.SseEventSink;
10    import java.util.Map;
11   
 
12    public class Channels {
13   
 
14  0 toggle public static <T> Subscriber<? super T> current() {
15  0 Map<Class<?>, Object> contextDataMap = ResteasyProviderFactory.getContextDataMap();
16   
17  0 return new CurrentContextSubscriber<T>(
18    (Sse) contextDataMap.get(Sse.class),
19    (MediaType) contextDataMap.get(MediaType.class),
20    (SseEventSink) contextDataMap.get(SseEventSink.class));
21    }
22    }