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
fc26b5d7
Commit
fc26b5d7
authored
Nov 23, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding BOSH connection listener.
parent
4976e86a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
ConnectionManagerImpl.java
.../org/jivesoftware/openfire/spi/ConnectionManagerImpl.java
+45
-0
No files found.
src/java/org/jivesoftware/openfire/spi/ConnectionManagerImpl.java
View file @
fc26b5d7
...
@@ -58,6 +58,8 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -58,6 +58,8 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
private
final
ConnectionListener
clientListener
;
private
final
ConnectionListener
clientListener
;
private
final
ConnectionListener
clientSslListener
;
private
final
ConnectionListener
clientSslListener
;
private
final
ConnectionListener
boshListener
;
private
final
ConnectionListener
boshSslListener
;
private
final
ConnectionListener
serverListener
;
private
final
ConnectionListener
serverListener
;
private
final
ConnectionListener
componentListener
;
private
final
ConnectionListener
componentListener
;
private
final
ConnectionListener
componentSslListener
;
private
final
ConnectionListener
componentSslListener
;
...
@@ -110,6 +112,33 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -110,6 +112,33 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
SOCKET_C2S
),
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
SOCKET_C2S
),
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
SOCKET_C2S
)
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
SOCKET_C2S
)
);
);
// BOSH / HTTP-bind
boshListener
=
new
ConnectionListener
(
ConnectionType
.
BOSH_C2S
,
HttpBindManager
.
HTTP_BIND_PORT
,
HttpBindManager
.
HTTP_BIND_PORT_DEFAULT
,
HttpBindManager
.
HTTP_BIND_ENABLED
,
// TODO this one property enables/disables both normal and legacymode port. Should be separated into two.
HttpBindManager
.
HTTP_BIND_THREADS
,
null
,
Connection
.
TLSPolicy
.
disabled
.
name
(),
// StartTLS over HTTP? Should use boshSslListener instead.
HttpBindManager
.
HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY
,
bindAddress
,
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
BOSH_C2S
),
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
BOSH_C2S
)
);
boshSslListener
=
new
ConnectionListener
(
ConnectionType
.
BOSH_C2S
,
HttpBindManager
.
HTTP_BIND_SECURE_PORT
,
HttpBindManager
.
HTTP_BIND_SECURE_PORT_DEFAULT
,
HttpBindManager
.
HTTP_BIND_ENABLED
,
// TODO this one property enables/disables both normal and legacymode port. Should be separated into two.
HttpBindManager
.
HTTP_BIND_THREADS
,
null
,
Connection
.
TLSPolicy
.
legacyMode
.
name
(),
HttpBindManager
.
HTTP_BIND_AUTH_PER_CLIENTCERT_POLICY
,
bindAddress
,
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
BOSH_C2S
),
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
BOSH_C2S
)
);
// server-to-server (federation)
// server-to-server (federation)
serverListener
=
new
ConnectionListener
(
serverListener
=
new
ConnectionListener
(
ConnectionType
.
SOCKET_S2S
,
ConnectionType
.
SOCKET_S2S
,
...
@@ -179,6 +208,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -179,6 +208,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
CONNECTION_MANAGER
),
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
CONNECTION_MANAGER
),
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
CONNECTION_MANAGER
)
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
CONNECTION_MANAGER
)
);
);
// Admin console (the Openfire web-admin) // TODO these use the XML properties instead of normal properties!
// Admin console (the Openfire web-admin) // TODO these use the XML properties instead of normal properties!
webAdminListener
=
new
ConnectionListener
(
webAdminListener
=
new
ConnectionListener
(
ConnectionType
.
WEBADMIN
,
ConnectionType
.
WEBADMIN
,
...
@@ -207,6 +237,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -207,6 +237,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
WEBADMIN
),
CertificateStoreManager
.
getIdentityStoreConfiguration
(
ConnectionType
.
WEBADMIN
),
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
WEBADMIN
)
CertificateStoreManager
.
getTrustStoreConfiguration
(
ConnectionType
.
WEBADMIN
)
);
);
}
}
/**
/**
...
@@ -308,6 +339,8 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -308,6 +339,8 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
final
Set
<
ConnectionListener
>
listeners
=
new
LinkedHashSet
<>();
final
Set
<
ConnectionListener
>
listeners
=
new
LinkedHashSet
<>();
listeners
.
add
(
clientListener
);
listeners
.
add
(
clientListener
);
listeners
.
add
(
clientSslListener
);
listeners
.
add
(
clientSslListener
);
listeners
.
add
(
boshListener
);
listeners
.
add
(
boshSslListener
);
listeners
.
add
(
serverListener
);
listeners
.
add
(
serverListener
);
listeners
.
add
(
componentListener
);
listeners
.
add
(
componentListener
);
listeners
.
add
(
componentSslListener
);
listeners
.
add
(
componentSslListener
);
...
@@ -341,6 +374,12 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -341,6 +374,12 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
return
clientListener
;
return
clientListener
;
}
}
case
BOSH_C2S:
if
(
startInSslMode
)
{
return
boshSslListener
;
}
else
{
return
boshListener
;
}
case
SOCKET_S2S:
case
SOCKET_S2S:
return
serverListener
;
// there's no legacy-mode server listener.
return
serverListener
;
// there's no legacy-mode server listener.
...
@@ -384,6 +423,9 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -384,6 +423,9 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
result
.
add
(
clientListener
);
result
.
add
(
clientListener
);
result
.
add
(
clientSslListener
);
result
.
add
(
clientSslListener
);
break
;
break
;
case
BOSH_C2S:
result
.
add
(
boshListener
);
result
.
add
(
boshSslListener
);
case
SOCKET_S2S:
case
SOCKET_S2S:
result
.
add
(
serverListener
);
// there's no legacy-mode server listener.
result
.
add
(
serverListener
);
// there's no legacy-mode server listener.
...
@@ -398,6 +440,9 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
...
@@ -398,6 +440,9 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
result
.
add
(
connectionManagerListener
);
result
.
add
(
connectionManagerListener
);
result
.
add
(
connectionManagerSslListener
);
result
.
add
(
connectionManagerSslListener
);
break
;
break
;
case
WEBADMIN:
result
.
add
(
webAdminListener
);
result
.
add
(
webAdminSslListener
);
default
:
default
:
throw
new
IllegalStateException
(
"Unknown connection type: "
+
type
);
throw
new
IllegalStateException
(
"Unknown connection type: "
+
type
);
...
...
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