Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
b158f6f2
Commit
b158f6f2
authored
Jul 11, 2017
by
Gregor Zurowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Lombok from spring-cloud-netflix-turbine-stream module
Signed-off-by:
Gregor Zurowski
<
gregor@zurowski.org
>
parent
d0009ba0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
13 deletions
+59
-13
pom.xml
spring-cloud-netflix-turbine-stream/pom.xml
+0
-7
HystrixStreamAggregator.java
...cloud/netflix/turbine/stream/HystrixStreamAggregator.java
+4
-2
TurbineStreamConfiguration.java
...ud/netflix/turbine/stream/TurbineStreamConfiguration.java
+4
-2
TurbineStreamProperties.java
...cloud/netflix/turbine/stream/TurbineStreamProperties.java
+51
-2
No files found.
spring-cloud-netflix-turbine-stream/pom.xml
View file @
b158f6f2
...
...
@@ -79,13 +79,6 @@
<artifactId>
rxjava
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<!-- Only needed at compile time -->
<scope>
compile
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<optional>
true
</optional>
...
...
spring-cloud-netflix-turbine-stream/src/main/java/org/springframework/cloud/netflix/turbine/stream/HystrixStreamAggregator.java
View file @
b158f6f2
...
...
@@ -20,6 +20,8 @@ import java.io.IOException;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.integration.annotation.ServiceActivator
;
import
org.springframework.messaging.handler.annotation.Payload
;
...
...
@@ -28,16 +30,16 @@ import org.springframework.util.StringUtils;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.apachecommons.CommonsLog
;
import
rx.subjects.PublishSubject
;
/**
* @author Spencer Gibb
*/
@CommonsLog
@Component
// needed for ServiceActivator to be picked up
public
class
HystrixStreamAggregator
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
HystrixStreamAggregator
.
class
);
private
ObjectMapper
objectMapper
;
private
PublishSubject
<
Map
<
String
,
Object
>>
subject
;
...
...
spring-cloud-netflix-turbine-stream/src/main/java/org/springframework/cloud/netflix/turbine/stream/TurbineStreamConfiguration.java
View file @
b158f6f2
...
...
@@ -21,6 +21,8 @@ import java.util.Map;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.actuator.HasFeatures
;
...
...
@@ -39,7 +41,6 @@ import io.netty.buffer.ByteBuf;
import
io.reactivex.netty.RxNetty
;
import
io.reactivex.netty.protocol.http.server.HttpServer
;
import
io.reactivex.netty.protocol.text.sse.ServerSentEvent
;
import
lombok.extern.apachecommons.CommonsLog
;
import
rx.Observable
;
import
rx.subjects.PublishSubject
;
...
...
@@ -47,10 +48,11 @@ import rx.subjects.PublishSubject;
* @author Spencer Gibb
*/
@Configuration
@CommonsLog
@EnableConfigurationProperties
(
TurbineStreamProperties
.
class
)
public
class
TurbineStreamConfiguration
implements
SmartLifecycle
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
TurbineStreamConfiguration
.
class
);
private
AtomicBoolean
running
=
new
AtomicBoolean
(
false
);
@Autowired
...
...
spring-cloud-netflix-turbine-stream/src/main/java/org/springframework/cloud/netflix/turbine/stream/TurbineStreamProperties.java
View file @
b158f6f2
...
...
@@ -21,13 +21,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import
org.springframework.cloud.netflix.hystrix.HystrixConstants
;
import
org.springframework.http.MediaType
;
import
lombok.Data
;
import
java.util.Objects
;
/**
* @author Dave Syer
* @author Gregor Zurowski
*/
@ConfigurationProperties
(
"turbine.stream"
)
@Data
public
class
TurbineStreamProperties
{
@Value
(
"${server.port:8989}"
)
...
...
@@ -36,4 +36,53 @@ public class TurbineStreamProperties {
private
String
destination
=
HystrixConstants
.
HYSTRIX_STREAM_DESTINATION
;
private
String
contentType
=
MediaType
.
APPLICATION_JSON_VALUE
;
public
int
getPort
()
{
return
port
;
}
public
void
setPort
(
int
port
)
{
this
.
port
=
port
;
}
public
String
getDestination
()
{
return
destination
;
}
public
void
setDestination
(
String
destination
)
{
this
.
destination
=
destination
;
}
public
String
getContentType
()
{
return
contentType
;
}
public
void
setContentType
(
String
contentType
)
{
this
.
contentType
=
contentType
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
TurbineStreamProperties
that
=
(
TurbineStreamProperties
)
o
;
return
port
==
that
.
port
&&
Objects
.
equals
(
destination
,
that
.
destination
)
&&
Objects
.
equals
(
contentType
,
that
.
contentType
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
port
,
destination
,
contentType
);
}
@Override
public
String
toString
()
{
return
new
StringBuilder
(
"TurbineStreamProperties{"
)
.
append
(
"port="
).
append
(
port
).
append
(
", "
)
.
append
(
"destination='"
).
append
(
destination
).
append
(
"', "
)
.
append
(
"contentType='"
).
append
(
contentType
).
append
(
"'}"
)
.
toString
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment