io.qt.websockets.QWebSocketServer Maven / Gradle / Ivy
package io.qt.websockets;
/**
* Implements a WebSocket-based server
* Java wrapper for Qt class QWebSocketServer
*/
public class QWebSocketServer extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QWebSocketServer.class);
/**
* Java wrapper for Qt enum QWebSocketServer::SslMode
*/
public enum SslMode implements io.qt.QtEnumerator {
SecureMode(0),
NonSecureMode(1);
private SslMode(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static SslMode resolve(int value) {
switch (value) {
case 0: return SecureMode;
case 1: return NonSecureMode;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QWebSocketServer::acceptError(QAbstractSocket::SocketError)
*/
@SuppressWarnings({"exports"})
public final Signal1 acceptError = new Signal1<>();
/**
* See QWebSocketServer::closed()
*/
public final Signal0 closed = new Signal0();
/**
* See QWebSocketServer::newConnection()
*/
public final Signal0 newConnection = new Signal0();
/**
* See QWebSocketServer::originAuthenticationRequired(QWebSocketCorsAuthenticator*)
*/
public final Signal1 originAuthenticationRequired = new Signal1<>();
/**
* See QWebSocketServer::peerVerifyError(QSslError)
*/
@SuppressWarnings({"exports"})
public final Signal1 peerVerifyError = new Signal1<>();
/**
* See QWebSocketServer::preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)
*/
@SuppressWarnings({"exports"})
public final Signal1 preSharedKeyAuthenticationRequired = new Signal1<>();
/**
* See QWebSocketServer::serverError(QWebSocketProtocol::CloseCode)
*/
public final Signal1 serverError = new Signal1<>();
/**
* See QWebSocketServer::sslErrors(QList<QSslError>)
*/
@SuppressWarnings({"exports"})
public final Signal1> sslErrors = new Signal1<>();
/**
* Overloaded constructor for {@link #QWebSocketServer(java.lang.String, io.qt.websockets.QWebSocketServer.SslMode, io.qt.core.QObject)}
* with parent = null
.
*/
public QWebSocketServer(java.lang.String serverName, io.qt.websockets.QWebSocketServer.SslMode secureMode) {
this(serverName, secureMode, (io.qt.core.QObject)null);
}
/**
* See QWebSocketServer::QWebSocketServer(QString,QWebSocketServer::SslMode,QObject*)
*/
public QWebSocketServer(java.lang.String serverName, io.qt.websockets.QWebSocketServer.SslMode secureMode, io.qt.core.QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, serverName, secureMode, parent);
}
private native static void initialize_native(QWebSocketServer instance, java.lang.String serverName, io.qt.websockets.QWebSocketServer.SslMode secureMode, io.qt.core.QObject parent);
/**
*
*/
@io.qt.QtUninvokable
public final void close(){
close_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void close_native(long __this__nativeId);
/**
* See QWebSocketServer::error()const
*/
@io.qt.QtUninvokable
public final io.qt.websockets.QWebSocketProtocol.CloseCode error(){
return io.qt.websockets.QWebSocketProtocol.CloseCode.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::errorString()const
*/
@io.qt.QtUninvokable
public final java.lang.String errorString(){
return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String errorString_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::handleConnection(QTcpSocket*)const
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final void handleConnection(io.qt.network.QTcpSocket socket){
handleConnection_native_QTcpSocket_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(socket));
}
@io.qt.QtUninvokable
private native void handleConnection_native_QTcpSocket_ptr_constfct(long __this__nativeId, long socket);
/**
* See QWebSocketServer::handshakeTimeoutMS()const
*/
@io.qt.QtUninvokable
public final int handshakeTimeoutMS(){
return handshakeTimeoutMS_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int handshakeTimeoutMS_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::hasPendingConnections()const
*/
@io.qt.QtUninvokable
public final boolean hasPendingConnections(){
return hasPendingConnections_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean hasPendingConnections_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::isListening()const
*/
@io.qt.QtUninvokable
public final boolean isListening(){
return isListening_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isListening_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #listen(io.qt.network.QHostAddress, short)}
* with port = 0
.
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final boolean listen(io.qt.network.QHostAddress address) {
return listen(address, (short)0);
}
/**
* Overloaded function for {@link #listen(io.qt.network.QHostAddress, short)}
* with:
* address = new io.qt.network.QHostAddress(io.qt.network.QHostAddress.SpecialAddress.Any)
* port = 0
*
*/
@io.qt.QtUninvokable
public final boolean listen() {
return listen(new io.qt.network.QHostAddress(io.qt.network.QHostAddress.SpecialAddress.Any), (short)0);
}
/**
* See QWebSocketServer::listen(QHostAddress,quint16)
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final boolean listen(io.qt.network.QHostAddress address, short port){
return listen_native_cref_QHostAddress_unsigned_short(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(address), port);
}
@io.qt.QtUninvokable
private native boolean listen_native_cref_QHostAddress_unsigned_short(long __this__nativeId, long address, short port);
/**
* See QWebSocketServer::maxPendingConnections()const
*/
@io.qt.QtUninvokable
public final int maxPendingConnections(){
return maxPendingConnections_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int maxPendingConnections_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::nativeDescriptor()const
*/
@io.qt.QtUninvokable
public final long nativeDescriptor(){
return nativeDescriptor_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native long nativeDescriptor_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::pauseAccepting()
*/
@io.qt.QtUninvokable
public final void pauseAccepting(){
pauseAccepting_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void pauseAccepting_native(long __this__nativeId);
/**
* See QWebSocketServer::proxy()const
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final io.qt.network.QNetworkProxy proxy(){
return proxy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.network.QNetworkProxy proxy_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::resumeAccepting()
*/
@io.qt.QtUninvokable
public final void resumeAccepting(){
resumeAccepting_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void resumeAccepting_native(long __this__nativeId);
/**
* See QWebSocketServer::secureMode()const
*/
@io.qt.QtUninvokable
public final io.qt.websockets.QWebSocketServer.SslMode secureMode(){
return io.qt.websockets.QWebSocketServer.SslMode.resolve(secureMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int secureMode_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::serverAddress()const
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final io.qt.network.QHostAddress serverAddress(){
return serverAddress_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.network.QHostAddress serverAddress_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::serverName()const
*/
@io.qt.QtUninvokable
public final java.lang.String serverName(){
return serverName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String serverName_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::serverPort()const
*/
@io.qt.QtUninvokable
public final short serverPort(){
return serverPort_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native short serverPort_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::serverUrl()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QUrl serverUrl(){
return serverUrl_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QUrl serverUrl_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::setHandshakeTimeout(int)
*/
@io.qt.QtUninvokable
public final void setHandshakeTimeout(int msec){
setHandshakeTimeout_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msec);
}
@io.qt.QtUninvokable
private native void setHandshakeTimeout_native_int(long __this__nativeId, int msec);
/**
* See QWebSocketServer::setMaxPendingConnections(int)
*/
@io.qt.QtUninvokable
public final void setMaxPendingConnections(int numConnections){
setMaxPendingConnections_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), numConnections);
}
@io.qt.QtUninvokable
private native void setMaxPendingConnections_native_int(long __this__nativeId, int numConnections);
/**
* See QWebSocketServer::setNativeDescriptor(qintptr)
*/
@io.qt.QtUninvokable
public final boolean setNativeDescriptor(long descriptor){
return setNativeDescriptor_native_qintptr(QtJambi_LibraryUtilities.internal.nativeId(this), descriptor);
}
@io.qt.QtUninvokable
private native boolean setNativeDescriptor_native_qintptr(long __this__nativeId, long descriptor);
/**
* See QWebSocketServer::setProxy(QNetworkProxy)
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final void setProxy(io.qt.network.QNetworkProxy networkProxy){
setProxy_native_cref_QNetworkProxy(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(networkProxy));
}
@io.qt.QtUninvokable
private native void setProxy_native_cref_QNetworkProxy(long __this__nativeId, long networkProxy);
/**
* See QWebSocketServer::setServerName(QString)
*/
@io.qt.QtUninvokable
public final void setServerName(java.lang.String serverName){
setServerName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), serverName);
}
@io.qt.QtUninvokable
private native void setServerName_native_cref_QString(long __this__nativeId, java.lang.String serverName);
/**
* See QWebSocketServer::setSocketDescriptor(int)
*
* @deprecated Use {@link io.qt.websockets.QWebSocketServer#setNativeDescriptor(long)} instead
*/
@Deprecated
@io.qt.QtUninvokable
public final boolean setSocketDescriptor(int socketDescriptor){
return setSocketDescriptor_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), socketDescriptor);
}
@Deprecated
@io.qt.QtUninvokable
private native boolean setSocketDescriptor_native_int(long __this__nativeId, int socketDescriptor);
/**
* See QWebSocketServer::setSslConfiguration(QSslConfiguration)
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final void setSslConfiguration(io.qt.network.QSslConfiguration sslConfiguration){
setSslConfiguration_native_cref_QSslConfiguration(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(sslConfiguration));
}
@io.qt.QtUninvokable
private native void setSslConfiguration_native_cref_QSslConfiguration(long __this__nativeId, long sslConfiguration);
/**
* See QWebSocketServer::socketDescriptor()const
*
* @deprecated Use {@link io.qt.websockets.QWebSocketServer#nativeDescriptor()} instead
*/
@Deprecated
@io.qt.QtUninvokable
public final int socketDescriptor(){
return socketDescriptor_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@Deprecated
@io.qt.QtUninvokable
private native int socketDescriptor_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::sslConfiguration()const
*/
@SuppressWarnings({"exports"})
@io.qt.QtUninvokable
public final io.qt.network.QSslConfiguration sslConfiguration(){
return sslConfiguration_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.network.QSslConfiguration sslConfiguration_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::supportedVersions()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList supportedVersions(){
return supportedVersions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList supportedVersions_native_constfct(long __this__nativeId);
/**
* See QWebSocketServer::nextPendingConnection()
*/
@io.qt.QtUninvokable
public io.qt.websockets.QWebSocket nextPendingConnection(){
return nextPendingConnection_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.websockets.QWebSocket nextPendingConnection_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QWebSocketServer(QPrivateConstructor p) { super(p); }
}