Package io.antmedia.console
Class AdminApplication
java.lang.Object
org.red5.server.adapter.AbstractScopeAdapter
org.red5.server.adapter.StatefulScopeWrappingAdapter
org.red5.server.adapter.MultiThreadedApplicationAdapter
io.antmedia.console.AdminApplication
- All Implemented Interfaces:
IEventHandler,IAttributeStore,ISchedulingService,IScopeAware,IScopeHandler,IScopeService,IBroadcastStreamService,IOnDemandStreamService,IStreamSecurityService,ISubscriberStreamService,IStreamAwareScopeHandler,ApplicationMXBean,AttributeStoreMXBean
Sample application that uses the client manager.
- Author:
- The Red5 Project ([email protected])
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate IClusterNotifierstatic final Stringprivate ConsoleDataStoreFactorystatic final Stringstatic final Stringprivate booleanprivate static final intprivate static final org.slf4j.Loggerprivate IScopeprivate io.vertx.core.Vertxprivate WarDeployerFields inherited from class org.red5.server.adapter.MultiThreadedApplicationAdapter
logger, schedulingServiceFields inherited from class org.red5.server.adapter.StatefulScopeWrappingAdapter
plugins, scopeFields inherited from interface org.red5.server.api.service.IBroadcastStreamService
BROADCAST_STREAM_SERVICEFields inherited from interface org.red5.server.api.service.IOnDemandStreamService
BEAN_NAMEFields inherited from interface org.red5.server.api.scheduling.ISchedulingService
BEAN_NAMEFields inherited from interface org.red5.server.api.service.IStreamSecurityService
BEAN_NAMEFields inherited from interface org.red5.server.api.service.ISubscriberStreamService
BEAN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled once on scope (that is, application or application room) start.booleanconnect(IConnection conn, IScope scope, Object[] params) Returns connection result for given scope and parameters.booleancreateApplication(String appName, String warFileFullPath) booleancreateApplicationWithURL(String appName, String warFileURI, String secretKey) booleandeleteApplication(String appName, boolean deleteDB) booleandeleteVoDStream(String appname, String streamName) voiddisconnect(IConnection conn, IScope scope) Returns disconnection result for given scope and parameters.downloadWarFile(String appName, String warFileUrl, String jwtSecretKey) getApplicationAdaptor(IScope appScope) getApplicationContext(String scopeName) intgetAppLiveStreamCount(IScope appScope) getAppLiveStreams(String name) static longgetDirectorySize(Path dir) org.apache.http.impl.client.CloseableHttpClientstatic Stringprivate IScopeprivate IScopegetScopes(IGlobalScope root, String scopeName) Gt only application scopeintintintgetVoDCount(IScope appScope) static FilegetWarFileInTmpDirectory(String warFileName) static StringgetWarName(String appName) booleanrunConfiguredCommand(String configuredCommand, String... args) booleanrunCreateAppScript(String appName) booleanrunCreateAppScript(String appName, boolean isCluster, String dbConnectionUrl, String warFileName) booleanrunDeleteAppScript(String appName) static FilesaveWARFile(String appName, InputStream inputStream) voidsetDataStoreFactory(ConsoleDataStoreFactory dataStoreFactory) voidsetVertx(io.vertx.core.Vertx vertx) voidsetWarDeployer(WarDeployer warDeployer) Methods inherited from class org.red5.server.adapter.MultiThreadedApplicationAdapter
addListener, addScheduledJob, addScheduledJobAfterDelay, addScheduledOnceJob, addScheduledOnceJob, appConnect, appDisconnect, appJoin, appLeave, appStop, connect, FCPublish, FCSubscribe, FCUnpublish, FCUnpublish, getBroadcastStream, getBroadcastStreamNames, getClientTTL, getGhostConnsCleanupPeriod, getListeners, getOnDemandStream, getScheduledJobNames, getStreamLength, getStreamPlaybackSecurity, getStreamPublishSecurity, getSubscriberStream, handleEvent, hasBroadcastStream, hasOnDemandStream, join, leave, measureBandwidth, measureBandwidth, pauseScheduledJob, registerStreamPlaybackSecurity, registerStreamPublishSecurity, rejectClient, rejectClient, removeListener, removeScheduledJob, resumeScheduledJob, roomConnect, roomDisconnect, roomJoin, roomLeave, roomStart, roomStop, setClientTTL, setGhostConnsCleanupPeriod, start, startTransmit, stop, stopTransmit, stopTransmit, streamBroadcastClose, streamBroadcastStart, streamPlayItemPause, streamPlayItemPlay, streamPlayItemResume, streamPlayItemSeek, streamPlayItemStop, streamPublishStart, streamRecordStart, streamRecordStop, streamSubscriberClose, streamSubscriberStart, unregisterStreamPlaybackSecurity, unregisterStreamPublishSecurityMethods inherited from class org.red5.server.adapter.StatefulScopeWrappingAdapter
createChildScope, getAttribute, getAttribute, getAttributeNames, getAttributes, getChildScope, getChildScopeNames, getClients, getConnections, getContext, getDepth, getName, getParent, getPath, getPlugins, getResource, getResources, getScope, hasAttribute, hasChildScope, hasParent, lookupConnections, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes, setPlugins, setScope, sizeMethods inherited from class org.red5.server.adapter.AbstractScopeAdapter
addChildScope, checkBandwidth, checkBandwidthUp, removeChildScope, serviceCall, setCanCallService, setCanConnect, setCanStart, setJoinMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.red5.server.api.scope.IScopeHandler
addChildScope, removeChildScope, serviceCall
-
Field Details
-
JWT_TOKEN_TIMEOUT_MS
private static final int JWT_TOKEN_TIMEOUT_MS- See Also:
-
CREATE_APP_COMMAND
- See Also:
-
DELETE_APP_COMMAND
- See Also:
-
ENABLE_SSL_COMMAND
- See Also:
-
log
private static final org.slf4j.Logger log -
APP_NAME
- See Also:
-
dataStoreFactory
-
rootScope
-
vertx
private io.vertx.core.Vertx vertx -
warDeployer
-
isCluster
private boolean isCluster -
clusterNotifier
-
currentApplicationCreationProcesses
-
-
Constructor Details
-
AdminApplication
public AdminApplication()
-
-
Method Details
-
appStart
Description copied from class:MultiThreadedApplicationAdapterCalled once on scope (that is, application or application room) start. You overrideMultiThreadedApplicationAdapter.appStart(IScope)orMultiThreadedApplicationAdapter.roomStart(IScope)in your application to make it act the way you want.- Specified by:
appStartin interfaceApplicationMXBean- Overrides:
appStartin classMultiThreadedApplicationAdapter- Parameters:
app- Application scope object- Returns:
trueif scope can be started,falseotherwise
-
createApplicationWithURL
-
connect
Returns connection result for given scope and parameters. Whether the scope is room or app level scope, this method distinguishes it and acts accordingly. You overrideMultiThreadedApplicationAdapter.appConnect(IConnection, Object[])orMultiThreadedApplicationAdapter.roomConnect(IConnection, Object[])in your application to make it act the way you want.- Specified by:
connectin interfaceIScopeHandler- Overrides:
connectin classMultiThreadedApplicationAdapter- Parameters:
conn- Connection objectscope- Scopeparams- List of params passed to connection handler- Returns:
trueif connect is successful,falseotherwise
-
disconnect
Returns disconnection result for given scope and parameters. Whether the scope is room or app level scope, this method distinguishes it and acts accordingly.- Specified by:
disconnectin interfaceIScopeHandler- Overrides:
disconnectin classMultiThreadedApplicationAdapter- Parameters:
conn- Connection objectscope- Scope
-
getRootScope
-
getTotalLiveStreamSize
public int getTotalLiveStreamSize() -
getApplicationInfo
-
getApplicationAdaptor
-
getDirectorySize
-
getVoDCount
-
getAppLiveStreams
-
deleteVoDStream
-
getApplications
-
getTotalConnectionSize
public int getTotalConnectionSize() -
getApplicationContext
-
getScope
-
getScopes
Gt only application scope- Parameters:
root-scopeName-- Returns:
- IScope the requested scope
-
getDataStoreFactory
-
setDataStoreFactory
-
getAppLiveStreamCount
-
createApplication
-
getCurrentApplicationCreationProcesses
-
getJavaTmpDirectory
-
getWarFileInTmpDirectory
-
getWarName
-
saveWARFile
-
getHttpClient
public org.apache.http.impl.client.CloseableHttpClient getHttpClient() -
downloadWarFile
public File downloadWarFile(String appName, String warFileUrl, String jwtSecretKey) throws IOException - Throws:
IOException
-
deleteApplication
-
runCreateAppScript
-
runCreateAppScript
-
runDeleteAppScript
-
getClusterNotifier
-
runConfiguredCommand
-
setVertx
public void setVertx(io.vertx.core.Vertx vertx) -
setWarDeployer
-