Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
Openfire
Commits
f585057d
Commit
f585057d
authored
Sep 16, 2017
by
Dave Cridland
Committed by
GitHub
Sep 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #871 from guusdk/OF-1309-fix
OF-1309: Make Hazelcast plugin use new API
parents
286debda
b33babe8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
59 deletions
+27
-59
changelog.html
src/plugins/hazelcast/changelog.html
+1
-0
plugin.xml
src/plugins/hazelcast/plugin.xml
+1
-1
pom.xml
src/plugins/hazelcast/pom.xml
+2
-2
OutgoingServerSessionTask.java
...re/openfire/plugin/session/OutgoingServerSessionTask.java
+2
-5
RemoteOutgoingServerSession.java
.../openfire/plugin/session/RemoteOutgoingServerSession.java
+20
-49
RemoteSessionTask.java
...vesoftware/openfire/plugin/session/RemoteSessionTask.java
+1
-2
No files found.
src/plugins/hazelcast/changelog.html
View file @
f585057d
...
...
@@ -47,6 +47,7 @@ Hazelcast Clustering Plugin Changelog
<p><b>
2.2.3
</b>
-- September 15, 2017
</p>
<ul>
<li>
Use an event rather than an arbitrary delay before starting clustering
</li>
<li>
Requires Openfire 4.2.0
</li>
</ul>
<p><b>
2.2.2
</b>
-- August 3, 2017
</p>
...
...
src/plugins/hazelcast/plugin.xml
View file @
f585057d
...
...
@@ -7,5 +7,5 @@
<author>
Tom Evans
</author>
<version>
2.2.3
</version>
<date>
09/15/2017
</date>
<minServerVersion>
4.
0
.0
</minServerVersion>
<minServerVersion>
4.
2
.0
</minServerVersion>
</plugin>
src/plugins/hazelcast/pom.xml
View file @
f585057d
...
...
@@ -8,7 +8,7 @@
</parent>
<groupId>
org.igniterealtime.openfire.plugins
</groupId>
<artifactId>
hazelcast
</artifactId>
<version>
2.2.
1
</version>
<version>
2.2.
3
</version>
<name>
Hazelcast Plugin
</name>
<description>
Adds clustering support
</description>
...
...
@@ -35,4 +35,4 @@
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
src/plugins/hazelcast/src/java/org/jivesoftware/openfire/plugin/session/OutgoingServerSessionTask.java
View file @
f585057d
...
...
@@ -49,11 +49,8 @@ public class OutgoingServerSessionTask extends RemoteSessionTask {
public
void
run
()
{
super
.
run
();
if
(
operation
==
Operation
.
getAuthenticatedDomains
)
{
result
=
((
OutgoingServerSession
)
getSession
()).
getAuthenticatedDomains
();
}
else
if
(
operation
==
Operation
.
getHostnames
)
{
result
=
((
OutgoingServerSession
)
getSession
()).
getHostnames
();
if
(
operation
==
Operation
.
getOutgoingDomainPairs
)
{
result
=
((
OutgoingServerSession
)
getSession
()).
getOutgoingDomainPairs
();
}
else
if
(
operation
==
Operation
.
isUsingServerDialback
)
{
result
=
((
OutgoingServerSession
)
getSession
()).
isUsingServerDialback
();
...
...
src/plugins/hazelcast/src/java/org/jivesoftware/openfire/plugin/session/RemoteOutgoingServerSession.java
View file @
f585057d
...
...
@@ -16,6 +16,7 @@
package
org
.
jivesoftware
.
openfire
.
plugin
.
session
;
import
org.jivesoftware.openfire.session.DomainPair
;
import
org.jivesoftware.openfire.session.OutgoingServerSession
;
import
org.jivesoftware.util.cache.ClusterTask
;
import
org.jivesoftware.util.cache.ExternalizableUtil
;
...
...
@@ -40,22 +41,15 @@ public class RemoteOutgoingServerSession extends RemoteSession implements Outgoi
super
(
nodeID
,
address
);
}
public
Collection
<
String
>
getAuthenticatedDomains
()
{
ClusterTask
task
=
getRemoteSessionTask
(
RemoteSessionTask
.
Operation
.
getAuthenticatedDomains
);
return
(
Collection
<
String
>)
doSynchronousClusterTask
(
task
);
public
Collection
<
DomainPair
>
getOutgoingDomainPairs
()
{
ClusterTask
task
=
getRemoteSessionTask
(
RemoteSessionTask
.
Operation
.
getOutgoingDomainPairs
);
return
(
Collection
<
DomainPair
>)
doSynchronousClusterTask
(
task
);
}
public
void
addAuthenticatedDomain
(
String
domain
)
{
doClusterTask
(
new
AddAuthenticatedDomainTask
(
address
,
domain
));
}
public
Collection
<
String
>
getHostnames
()
{
ClusterTask
task
=
getRemoteSessionTask
(
RemoteSessionTask
.
Operation
.
getHostnames
);
return
(
Collection
<
String
>)
doSynchronousClusterTask
(
task
);
}
public
void
addHostname
(
String
hostname
)
{
doClusterTask
(
new
AddHostnameTask
(
address
,
hostname
));
public
void
addOutgoingDomainPair
(
String
local
,
String
remote
)
{
doClusterTask
(
new
AddOutgoingDomainPair
(
address
,
local
,
remote
));
}
public
boolean
authenticateSubdomain
(
String
domain
,
String
hostname
)
{
...
...
@@ -88,57 +82,34 @@ public class RemoteOutgoingServerSession extends RemoteSession implements Outgoi
return
new
ProcessPacketTask
(
this
,
address
,
packet
);
}
private
static
class
AddAuthenticatedDomainTask
extends
OutgoingServerSessionTask
{
private
String
domain
;
public
AddAuthenticatedDomainTask
()
{
super
();
}
protected
AddAuthenticatedDomainTask
(
JID
address
,
String
domain
)
{
super
(
address
,
null
);
this
.
domain
=
domain
;
}
public
void
run
()
{
((
OutgoingServerSession
)
getSession
()).
addAuthenticatedDomain
(
domain
);
}
public
void
writeExternal
(
ObjectOutput
out
)
throws
IOException
{
super
.
writeExternal
(
out
);
ExternalizableUtil
.
getInstance
().
writeSafeUTF
(
out
,
domain
);
}
public
void
readExternal
(
ObjectInput
in
)
throws
IOException
,
ClassNotFoundException
{
super
.
readExternal
(
in
);
domain
=
ExternalizableUtil
.
getInstance
().
readSafeUTF
(
in
);
}
}
private
static
class
AddHostnameTask
extends
OutgoingServerSessionTask
{
private
String
hostname
;
private
static
class
AddOutgoingDomainPair
extends
OutgoingServerSessionTask
{
private
String
local
;
private
String
remote
;
public
Add
HostnameTask
()
{
public
Add
OutgoingDomainPair
()
{
super
();
}
protected
Add
HostnameTask
(
JID
address
,
String
hostnam
e
)
{
protected
Add
OutgoingDomainPair
(
JID
address
,
String
local
,
String
remot
e
)
{
super
(
address
,
null
);
this
.
hostname
=
hostname
;
this
.
local
=
local
;
this
.
remote
=
remote
;
}
public
void
run
()
{
((
OutgoingServerSession
)
getSession
()).
add
Hostname
(
hostnam
e
);
((
OutgoingServerSession
)
getSession
()).
add
OutgoingDomainPair
(
local
,
remot
e
);
}
public
void
writeExternal
(
ObjectOutput
out
)
throws
IOException
{
super
.
writeExternal
(
out
);
ExternalizableUtil
.
getInstance
().
writeSafeUTF
(
out
,
hostname
);
ExternalizableUtil
.
getInstance
().
writeSafeUTF
(
out
,
local
);
ExternalizableUtil
.
getInstance
().
writeSafeUTF
(
out
,
remote
);
}
public
void
readExternal
(
ObjectInput
in
)
throws
IOException
,
ClassNotFoundException
{
super
.
readExternal
(
in
);
hostname
=
ExternalizableUtil
.
getInstance
().
readSafeUTF
(
in
);
local
=
ExternalizableUtil
.
getInstance
().
readSafeUTF
(
in
);
remote
=
ExternalizableUtil
.
getInstance
().
readSafeUTF
(
in
);
}
}
...
...
src/plugins/hazelcast/src/java/org/jivesoftware/openfire/plugin/session/RemoteSessionTask.java
View file @
f585057d
...
...
@@ -160,8 +160,7 @@ public abstract class RemoteSessionTask implements ClusterTask<Object> {
/**
* Operations of outgoing server sessions
*/
getAuthenticatedDomains
,
getHostnames
,
getOutgoingDomainPairs
,
isUsingServerDialback
,
/**
...
...
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