Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
91ffaeb2
Commit
91ffaeb2
authored
14 years ago
by
Richard Alam
Browse files
Options
Downloads
Patches
Plain Diff
- hook into shutdown event so we can kick all users from the conference
parent
48d7e008
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java
+21
-0
21 additions, 0 deletions
...rg/bigbluebutton/conference/BigBlueButtonApplication.java
with
21 additions
and
0 deletions
bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java
+
21
−
0
View file @
91ffaeb2
...
...
@@ -28,8 +28,12 @@ import org.red5.logging.Red5LoggerFactory;
import
org.red5.server.adapter.IApplication
;
import
org.red5.server.adapter.MultiThreadedApplicationAdapter
;
import
org.red5.server.api.IConnection
;
import
org.red5.server.api.IContext
;
import
org.red5.server.api.IScope
;
import
org.slf4j.Logger
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.support.AbstractApplicationContext
;
public
class
BigBlueButtonApplication
extends
MultiThreadedApplicationAdapter
{
...
...
@@ -38,12 +42,17 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
private
static
final
String
APP
=
"BigBlueButtonApplication"
;
private
ParticipantsApplication
participantsApplication
;
private
RecorderApplication
recorderApplication
;
private
AbstractApplicationContext
appCtx
;
private
String
version
;
@Override
public
boolean
appStart
(
IScope
app
)
{
log
.
debug
(
"Starting BigBlueButton version {}"
,
version
);
IContext
context
=
app
.
getContext
();
appCtx
=
(
AbstractApplicationContext
)
context
.
getApplicationContext
();
appCtx
.
addApplicationListener
(
new
ShutdownHookListener
());
appCtx
.
registerShutdownHook
();
return
super
.
appStart
(
app
);
}
...
...
@@ -157,4 +166,16 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
private
BigBlueButtonSession
getBbbSession
()
{
return
(
BigBlueButtonSession
)
Red5
.
getConnectionLocal
().
getAttribute
(
Constants
.
SESSION
);
}
private
class
ShutdownHookListener
implements
ApplicationListener
<
ApplicationEvent
>
{
@Override
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
if
(
event
instanceof
org
.
springframework
.
context
.
event
.
ContextStoppedEvent
)
{
log
.
info
(
"Received shutdown event. Destroying all rooms."
);
participantsApplication
.
destroyAllRooms
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment