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
4b4a8a5b
Commit
4b4a8a5b
authored
Aug 19, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings
parent
afdb5a31
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
27 deletions
+41
-27
EurekaInstanceCanceledEvent.java
...orm/netflix/eureka/event/EurekaInstanceCanceledEvent.java
+4
-0
EurekaInstanceRegisteredEvent.java
...m/netflix/eureka/event/EurekaInstanceRegisteredEvent.java
+5
-0
EurekaInstanceRenewedEvent.java
...form/netflix/eureka/event/EurekaInstanceRenewedEvent.java
+5
-0
LeaseManagerMessageBroker.java
...tform/netflix/eureka/event/LeaseManagerMessageBroker.java
+11
-10
FilterIntializer.java
...ringframework/platform/netflix/zuul/FilterIntializer.java
+8
-11
SendResponseFilter.java
...latform/netflix/zuul/filters/post/SendResponseFilter.java
+3
-2
StatsFilter.java
...ework/platform/netflix/zuul/filters/post/StatsFilter.java
+4
-3
RibbonRoutingFilter.java
...tform/netflix/zuul/filters/route/RibbonRoutingFilter.java
+1
-1
No files found.
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/event/EurekaInstanceCanceledEvent.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEvent
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceCanceledEvent
extends
ApplicationEvent
{
public
class
EurekaInstanceCanceledEvent
extends
ApplicationEvent
{
private
String
appName
;
private
String
appName
;
private
String
serverId
;
private
String
serverId
;
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/event/EurekaInstanceRegisteredEvent.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.appinfo.InstanceInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEvent
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceRegisteredEvent
extends
ApplicationEvent
{
public
class
EurekaInstanceRegisteredEvent
extends
ApplicationEvent
{
private
InstanceInfo
instanceInfo
;
private
InstanceInfo
instanceInfo
;
private
int
leaseDuration
;
private
int
leaseDuration
;
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/event/EurekaInstanceRenewedEvent.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.appinfo.InstanceInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEvent
;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@SuppressWarnings
(
"serial"
)
public
class
EurekaInstanceRenewedEvent
extends
ApplicationEvent
{
public
class
EurekaInstanceRenewedEvent
extends
ApplicationEvent
{
private
String
appName
;
private
String
appName
;
private
String
serverId
;
private
String
serverId
;
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/event/LeaseManagerMessageBroker.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
package
org
.
springframework
.
platform
.
netflix
.
eureka
.
event
;
import
static
com
.
google
.
common
.
collect
.
Iterables
.
tryFind
;
import
java.util.List
;
import
javax.annotation.Nullable
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
com.google.common.base.Optional
;
import
com.google.common.base.Optional
;
import
com.google.common.base.Predicate
;
import
com.google.common.base.Predicate
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.discovery.DiscoveryManager
;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.discovery.shared.Application
;
import
com.netflix.eureka.PeerAwareInstanceRegistry
;
import
com.netflix.eureka.PeerAwareInstanceRegistry
;
import
com.netflix.eureka.lease.LeaseManager
;
import
com.netflix.eureka.lease.LeaseManager
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
javax.annotation.Nullable
;
import
java.util.List
;
import
static
com
.
google
.
common
.
collect
.
Iterables
.*;
/**
/**
* @author Spencer Gibb
* @author Spencer Gibb
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/zuul/FilterIntializer.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
zuul
;
package
org
.
springframework
.
platform
.
netflix
.
zuul
;
import
com.netflix.zuul.FilterFileManager
;
import
java.util.Map
;
import
com.netflix.zuul.FilterLoader
;
import
com.netflix.zuul.ZuulFilter
;
import
javax.servlet.ServletContextEvent
;
import
com.netflix.zuul.filters.FilterRegistry
;
import
javax.servlet.ServletContextListener
;
import
com.netflix.zuul.groovy.GroovyCompiler
;
import
com.netflix.zuul.groovy.GroovyFileFilter
;
import
com.netflix.zuul.monitoring.MonitoringHelper
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.ServletContextEvent
;
import
com.netflix.zuul.ZuulFilter
;
import
javax.servlet.ServletContextListener
;
import
com.netflix.zuul.filters.FilterRegistry
;
import
java.util.List
;
import
com.netflix.zuul.monitoring.MonitoringHelper
;
import
java.util.Map
;
/**
/**
* User: spencergibb
* User: spencergibb
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/zuul/filters/post/SendResponseFilter.java
View file @
4b4a8a5b
...
@@ -2,7 +2,6 @@ package org.springframework.platform.netflix.zuul.filters.post;
...
@@ -2,7 +2,6 @@ package org.springframework.platform.netflix.zuul.filters.post;
import
com.google.common.base.Throwables
;
import
com.google.common.base.Throwables
;
import
com.netflix.config.DynamicBooleanProperty
;
import
com.netflix.config.DynamicBooleanProperty
;
import
com.netflix.config.DynamicIntProperty
;
import
com.netflix.config.DynamicIntProperty
;
import
com.netflix.config.DynamicPropertyFactory
;
import
com.netflix.config.DynamicPropertyFactory
;
import
com.netflix.util.Pair
;
import
com.netflix.util.Pair
;
...
@@ -13,6 +12,7 @@ import com.netflix.zuul.context.Debug;
...
@@ -13,6 +12,7 @@ import com.netflix.zuul.context.Debug;
import
com.netflix.zuul.context.RequestContext
;
import
com.netflix.zuul.context.RequestContext
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
...
@@ -143,7 +143,8 @@ public class SendResponseFilter extends ZuulFilter {
...
@@ -143,7 +143,8 @@ public class SendResponseFilter extends ZuulFilter {
List
<
Pair
<
String
,
String
>>
zuulResponseHeaders
=
context
.
getZuulResponseHeaders
();
List
<
Pair
<
String
,
String
>>
zuulResponseHeaders
=
context
.
getZuulResponseHeaders
();
String
debugHeader
=
""
;
String
debugHeader
=
""
;
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"routingDebug"
);
@SuppressWarnings
(
"unchecked"
)
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"routingDebug"
);
for
(
String
it
:
rd
)
{
for
(
String
it
:
rd
)
{
debugHeader
+=
"[[["
+
it
+
"]]]"
;
debugHeader
+=
"[[["
+
it
+
"]]]"
;
}
}
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/zuul/filters/post/StatsFilter.java
View file @
4b4a8a5b
package
org
.
springframework
.
platform
.
netflix
.
zuul
.
filters
.
post
;
package
org
.
springframework
.
platform
.
netflix
.
zuul
.
filters
.
post
;
import
com.netflix.zuul.ZuulFilter
;
import
com.netflix.zuul.ZuulFilter
;
import
com.netflix.zuul.context.RequestContext
;
import
com.netflix.zuul.context.RequestContext
;
import
java.util.List
;
import
java.util.List
;
...
@@ -30,7 +29,8 @@ public class StatsFilter extends ZuulFilter {
...
@@ -30,7 +29,8 @@ public class StatsFilter extends ZuulFilter {
}
}
public
void
dumpRequestDebug
()
{
public
void
dumpRequestDebug
()
{
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"requestDebug"
);
@SuppressWarnings
(
"unchecked"
)
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"requestDebug"
);
if
(
rd
!=
null
)
{
if
(
rd
!=
null
)
{
for
(
String
it
:
rd
)
{
for
(
String
it
:
rd
)
{
System
.
out
.
println
(
"REQUEST_DEBUG::"
+
it
);
System
.
out
.
println
(
"REQUEST_DEBUG::"
+
it
);
...
@@ -39,7 +39,8 @@ public class StatsFilter extends ZuulFilter {
...
@@ -39,7 +39,8 @@ public class StatsFilter extends ZuulFilter {
}
}
public
void
dumpRoutingDebug
()
{
public
void
dumpRoutingDebug
()
{
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"routingDebug"
);
@SuppressWarnings
(
"unchecked"
)
List
<
String
>
rd
=
(
List
<
String
>)
RequestContext
.
getCurrentContext
().
get
(
"routingDebug"
);
if
(
rd
!=
null
)
{
if
(
rd
!=
null
)
{
for
(
String
it
:
rd
)
{
for
(
String
it
:
rd
)
{
System
.
out
.
println
(
"ZUUL_DEBUG::"
+
it
);
System
.
out
.
println
(
"ZUUL_DEBUG::"
+
it
);
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/zuul/filters/route/RibbonRoutingFilter.java
View file @
4b4a8a5b
...
@@ -176,7 +176,7 @@ public class RibbonRoutingFilter extends ZuulFilter {
...
@@ -176,7 +176,7 @@ public class RibbonRoutingFilter extends ZuulFilter {
RequestContext
context
=
RequestContext
.
getCurrentContext
();
RequestContext
context
=
RequestContext
.
getCurrentContext
();
MultivaluedMap
<
String
,
String
>
headers
=
new
MultivaluedMapImpl
();
MultivaluedMap
<
String
,
String
>
headers
=
new
MultivaluedMapImpl
();
Enumeration
headerNames
=
request
.
getHeaderNames
();
Enumeration
<?>
headerNames
=
request
.
getHeaderNames
();
if
(
headerNames
!=
null
)
{
if
(
headerNames
!=
null
)
{
while
(
headerNames
.
hasMoreElements
())
{
while
(
headerNames
.
hasMoreElements
())
{
String
name
=
(
String
)
headerNames
.
nextElement
();
String
name
=
(
String
)
headerNames
.
nextElement
();
...
...
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