Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
3d8387b2
Commit
3d8387b2
authored
Apr 11, 2016
by
Björn Richerzhagen
Browse files
LifecycleComponent for generic churn handling.
Requires Peerfact-Update (master)
parent
0cea3e2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/LifecycleComponent.java
0 → 100644
View file @
3d8387b2
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
* Simonstrator.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package
de.tudarmstadt.maki.simonstrator.api.component
;
/**
* This component can be controlled by a churn generator. Could be a network
* interface, an application, an overlay. Allows us to reuse network churn
* generators with overlay components etc.
*
* A churn generator should include means to specify on which kind of
* {@link LifecycleComponent}s it wants to operate.
*
* @author Bjoern Richerzhagen
*
*/
public
interface
LifecycleComponent
extends
HostComponent
{
/**
* Has to return true, if the {@link LifecycleComponent} is considered
* active.
*
* @return
*/
public
boolean
isActive
();
/**
* Stops all activity of this {@link LifecycleComponent} - e.g., leaves
* an overlay, deactivates a network interface.
*/
public
void
stopComponent
();
/**
* Starts all activity of this {@link LifecycleComponent} - e.g., joins
* an overlay, activates a network interface.
*/
public
void
startComponent
();
}
src/de/tudarmstadt/maki/simonstrator/api/component/network/ControllableNetInterface.java
View file @
3d8387b2
package
de.tudarmstadt.maki.simonstrator.api.component.network
;
import
de.tudarmstadt.maki.simonstrator.api.component.LifecycleComponent
;
/**
* Extending the NetInterface, this interface can be turned on and off by the
app/overlay.
* The re
p
sective ConnectivityListener will be notified.
* Extending the NetInterface, this interface can be turned on and off by the
*
app/overlay.
The res
p
ective ConnectivityListener will be notified.
*
* @author Bjoern Richerzhagen
*
*/
public
interface
ControllableNetInterface
extends
NetInterface
{
public
interface
ControllableNetInterface
extends
NetInterface
,
LifecycleComponent
{
/*
* This interface is just a marker for ChurnEnabledComponents
*/
/**
* Activates the NetInterface, if it was previously disabled.
*/
* Activates the NetInterface, if it was previously disabled.
*
* @deprecated use methods provided by the {@link LifecycleComponent}
* instead.
*/
@Deprecated
public
void
turnOn
();
/**
* Deactivates the NetInterface, if it was previously enabled.
*/
* Deactivates the NetInterface, if it was previously enabled.
*
* @deprecated use methods provided by the {@link LifecycleComponent}
* instead.
*/
public
void
turnOff
();
}
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