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
81111e99
Commit
81111e99
authored
Nov 28, 2015
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for more types of connection acceptors than just NIO/MINA based ones.
parent
c4773fd9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
340 additions
and
296 deletions
+340
-296
ConnectionAcceptor.java
...ava/org/jivesoftware/openfire/spi/ConnectionAcceptor.java
+27
-288
ConnectionListener.java
...ava/org/jivesoftware/openfire/spi/ConnectionListener.java
+7
-8
MINAConnectionAcceptor.java
...org/jivesoftware/openfire/spi/MINAConnectionAcceptor.java
+306
-0
No files found.
src/java/org/jivesoftware/openfire/spi/ConnectionAcceptor.java
View file @
81111e99
This diff is collapsed.
Click to expand it.
src/java/org/jivesoftware/openfire/spi/ConnectionListener.java
View file @
81111e99
...
...
@@ -19,8 +19,7 @@ import java.util.Set;
* As a server, Openfire accepts connection requests from other network entities. The exact functionality is subject to
* configuration details (eg: TCP port on which connections are accepted, TLS policy that is applied, etc). An instance
* of this class is used to manage this configuration for one type of connection (on one TCP port), and is responsible
* for managing the lifecycle of the entity that implements the acceptance of new socket connections (as implemented by
* {@link ConnectionAcceptor}.
* for managing the lifecycle of the entity that implements the acceptance of new connections.
*
* @author Guus der Kinderen, guus.der.kinderen@gmail.com
*/
...
...
@@ -178,7 +177,7 @@ public class ConnectionListener
case
SOCKET_S2S:
case
BOSH_C2S:
case
WEBADMIN:
Log
.
debug
(
"Not starting a (
NIO
-based) connection acceptor, as connections of type "
+
getType
()
+
" depend on another IO technology."
);
Log
.
debug
(
"Not starting a (
MINA
-based) connection acceptor, as connections of type "
+
getType
()
+
" depend on another IO technology."
);
return
;
default
:
...
...
@@ -206,7 +205,7 @@ public class ConnectionListener
}
Log
.
debug
(
"Starting..."
);
connectionAcceptor
=
new
ConnectionAcceptor
(
generateConnectionConfiguration
()
);
connectionAcceptor
=
new
MINA
ConnectionAcceptor
(
generateConnectionConfiguration
()
);
connectionAcceptor
.
start
();
Log
.
info
(
"Started."
);
}
...
...
@@ -313,19 +312,19 @@ public class ConnectionListener
}
/**
* Returns the acceptor that is managed by the instance.
* Returns the
MINA-specific socket
acceptor that is managed by the instance.
*
* @return A socket acceptor, or null when this listener is disabled.
* @return A socket acceptor, or null when this listener is disabled
or not based on a MINA implementation
.
*/
// TODO see if we can avoid exposing MINA internals.
public
NioSocketAcceptor
getSocketAcceptor
()
{
if
(
connectionAcceptor
==
null
)
if
(
connectionAcceptor
==
null
||
!(
connectionAcceptor
instanceof
MINAConnectionAcceptor
)
)
{
return
null
;
}
return
connectionAcceptor
.
getSocketAcceptor
();
return
((
MINAConnectionAcceptor
)
connectionAcceptor
)
.
getSocketAcceptor
();
}
/**
...
...
src/java/org/jivesoftware/openfire/spi/MINAConnectionAcceptor.java
0 → 100644
View file @
81111e99
This diff is collapsed.
Click to expand it.
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