Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
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-boot-admin
Commits
184528cf
Commit
184528cf
authored
Nov 10, 2015
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove commons-lang dependent code
parent
a84f581e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
29 deletions
+33
-29
ClientApplicationDeregisteredEvent.java
.../boot/admin/event/ClientApplicationDeregisteredEvent.java
+1
-6
ClientApplicationEvent.java
.../codecentric/boot/admin/event/ClientApplicationEvent.java
+30
-11
ClientApplicationRegisteredEvent.java
...ic/boot/admin/event/ClientApplicationRegisteredEvent.java
+1
-6
ClientApplicationStatusChangedEvent.java
...boot/admin/event/ClientApplicationStatusChangedEvent.java
+1
-6
No files found.
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/event/ClientApplicationDeregisteredEvent.java
View file @
184528cf
...
...
@@ -26,11 +26,6 @@ public class ClientApplicationDeregisteredEvent extends ClientApplicationEvent {
private
static
final
long
serialVersionUID
=
1L
;
public
ClientApplicationDeregisteredEvent
(
Application
application
)
{
super
(
application
);
}
@Override
public
String
getType
()
{
return
"DEREGISTRATION"
;
super
(
application
,
"DEREGISTRATION"
);
}
}
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/event/ClientApplicationEvent.java
View file @
184528cf
...
...
@@ -17,9 +17,6 @@ package de.codecentric.boot.admin.event;
import
java.io.Serializable
;
import
org.apache.commons.lang.builder.EqualsBuilder
;
import
org.apache.commons.lang.builder.HashCodeBuilder
;
import
de.codecentric.boot.admin.model.Application
;
/**
...
...
@@ -33,10 +30,12 @@ public abstract class ClientApplicationEvent implements Serializable {
private
final
Application
application
;
private
final
long
timestamp
;
private
final
String
type
;
p
ublic
ClientApplicationEvent
(
Application
application
)
{
p
rotected
ClientApplicationEvent
(
Application
application
,
String
type
)
{
this
.
application
=
application
;
this
.
timestamp
=
System
.
currentTimeMillis
();
this
.
type
=
type
;
}
/**
...
...
@@ -56,12 +55,18 @@ public abstract class ClientApplicationEvent implements Serializable {
/**
* Return the event type (for JSON).
*/
public
abstract
String
getType
();
public
String
getType
()
{
return
type
;
}
@Override
public
int
hashCode
()
{
return
new
HashCodeBuilder
().
append
(
application
).
append
(
timestamp
).
append
(
getType
())
.
toHashCode
();
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
application
==
null
)
?
0
:
application
.
hashCode
());
result
=
prime
*
result
+
(
int
)
(
timestamp
^
(
timestamp
>>>
32
));
result
=
prime
*
result
+
((
type
==
null
)
?
0
:
type
.
hashCode
());
return
result
;
}
@Override
...
...
@@ -76,9 +81,23 @@ public abstract class ClientApplicationEvent implements Serializable {
return
false
;
}
ClientApplicationEvent
other
=
(
ClientApplicationEvent
)
obj
;
return
new
EqualsBuilder
().
append
(
this
.
application
,
other
.
application
)
.
append
(
this
.
timestamp
,
other
.
timestamp
).
append
(
this
.
getType
(),
other
.
getType
())
.
isEquals
();
if
(
application
==
null
)
{
if
(
other
.
application
!=
null
)
{
return
false
;
}
}
else
if
(!
application
.
equals
(
other
.
application
))
{
return
false
;
}
if
(
timestamp
!=
other
.
timestamp
)
{
return
false
;
}
if
(
type
==
null
)
{
if
(
other
.
type
!=
null
)
{
return
false
;
}
}
else
if
(!
type
.
equals
(
other
.
type
))
{
return
false
;
}
return
true
;
}
}
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/event/ClientApplicationRegisteredEvent.java
View file @
184528cf
...
...
@@ -26,11 +26,6 @@ public class ClientApplicationRegisteredEvent extends ClientApplicationEvent {
private
static
final
long
serialVersionUID
=
1L
;
public
ClientApplicationRegisteredEvent
(
Application
application
)
{
super
(
application
);
}
@Override
public
String
getType
()
{
return
"REGISTRATION"
;
super
(
application
,
"REGISTRATION"
);
}
}
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/event/ClientApplicationStatusChangedEvent.java
View file @
184528cf
...
...
@@ -30,7 +30,7 @@ public class ClientApplicationStatusChangedEvent extends ClientApplicationEvent
public
ClientApplicationStatusChangedEvent
(
Application
application
,
StatusInfo
from
,
StatusInfo
to
)
{
super
(
application
);
super
(
application
,
"STATUS_CHANGE"
);
this
.
from
=
from
;
this
.
to
=
to
;
}
...
...
@@ -42,9 +42,4 @@ public class ClientApplicationStatusChangedEvent extends ClientApplicationEvent
public
StatusInfo
getTo
()
{
return
to
;
}
@Override
public
String
getType
()
{
return
"STATUS_CHANGE"
;
}
}
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