public class AgoraService
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
isLoaded |
private long |
nativeHandle |
| Constructor and Description |
|---|
AgoraService()
Constructs an AgoraService instance and initializes the native components.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkPlatformArchitecture() |
AgoraMediaComponentFactory |
createAgoraMediaComponentFactory()
Creates and returns an AgoraMediaComponentFactory object for creating media
|
AgoraParameter |
getAgoraParameter()
Creates and returns an AgoraParameter object for parameter management.
|
long |
getNativeHandle()
Gets the native handle associated with this AgoraService instance.
|
static java.lang.String |
getSdkVersion()
Gets the SDK version.
|
int |
initialize(AgoraServiceConfiguration config)
Initializes the AgoraService object with the specified configuration.
|
private long |
nativeCreateAgoraMediaComponentFactory(long nativeHandle) |
private long |
nativeGetAgoraParameter(long nativeHandle) |
private static java.lang.String |
nativeGetSdkVersion() |
private long |
nativeInit() |
private int |
nativeInitialize(long nativeHandle,
AgoraServiceConfiguration config) |
private int |
nativeRelease(long nativeHandle) |
private int |
nativeSetGlobalLocalAccessPoint(long nativeHandle,
LocalAccessPointConfiguration config) |
private int |
nativeSetLogFile(long nativeHandle,
java.lang.String filePath,
int fileSize) |
private int |
nativeSetLogLevel(long nativeHandle,
int level) |
int |
release()
Releases the AgoraService object and its associated resources.
|
int |
setGlobalLocalAccessPoint(LocalAccessPointConfiguration config)
Set Global local access point addresses in local Ap mode (which also calls
local proxy).
|
int |
setLogFile(java.lang.String filePath,
int fileSize)
Sets the path and size of the SDK log files.
|
int |
setLogLevel(Constants.LogLevel level)
Sets the SDK log output level.
|
private static volatile boolean isLoaded
private long nativeHandle
public AgoraService()
private void checkPlatformArchitecture()
public long getNativeHandle()
public int release()
public int initialize(AgoraServiceConfiguration config)
config - The configuration object containing initialization parameterspublic AgoraMediaComponentFactory createAgoraMediaComponentFactory()
public AgoraParameter getAgoraParameter()
public static java.lang.String getSdkVersion()
public int setLogFile(java.lang.String filePath,
int fileSize)
filePath - The path of the log file. Ensure that the directory of the
log file exists and is writable.fileSize - The size of the SDK log file size (Byte), which means
fileSize bytes per log file.public int setLogLevel(Constants.LogLevel level)
level - The log output level.
- `LOG_LEVEL_NONE (0x0000)`: Do not output any log file.
- `LOG_LEVEL_INFO (0x0001)`: (Recommended) Output log files of
the INFO level.
- `LOG_LEVEL_WARN (0x0002)`: Output log files of the WARN
level.
- `LOG_LEVEL_ERROR (0x0004)`: Output log files of the ERROR
level.
- `LOG_LEVEL_FATAL (0x0008)`: Output log files of the FATAL
level.public int setGlobalLocalAccessPoint(LocalAccessPointConfiguration config)
This method must be called before
initialize(AgoraServiceConfiguration).
config - The LocalAccessPointConfiguration object. See the
definition of
LocalAccessPointConfiguration for details.private long nativeInit()
private int nativeRelease(long nativeHandle)
private int nativeInitialize(long nativeHandle,
AgoraServiceConfiguration config)
private long nativeCreateAgoraMediaComponentFactory(long nativeHandle)
private long nativeGetAgoraParameter(long nativeHandle)
private static java.lang.String nativeGetSdkVersion()
private int nativeSetLogFile(long nativeHandle,
java.lang.String filePath,
int fileSize)
private int nativeSetLogLevel(long nativeHandle,
int level)
private int nativeSetGlobalLocalAccessPoint(long nativeHandle,
LocalAccessPointConfiguration config)