All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.web.websockets.AspNetWebSocketContext Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.14.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.web.websockets;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.net.websockets.WebSocketContext;
import system.collections.IDictionary;
import system.collections.IDictionaryImplementation;
import system.collections.specialized.NameValueCollection;
import system.DateTime;
import system.net.CookieCollection;
import system.net.websockets.WebSocket;
import system.security.principal.IPrincipal;
import system.security.principal.IPrincipalImplementation;
import system.security.principal.WindowsIdentity;
import system.Uri;
import system.web.caching.Cache;
import system.web.HttpApplicationStateBase;
import system.web.HttpClientCertificate;
import system.web.HttpCookieCollection;
import system.web.HttpServerUtilityBase;
import system.web.profile.ProfileBase;
import system.web.UnvalidatedRequestValuesBase;


/**
 * The base .NET class managing System.Web.WebSockets.AspNetWebSocketContext, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Web.WebSockets.AspNetWebSocketContext *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.14.0.0 */ public class AspNetWebSocketContext extends WebSocketContext { /** * Fully assembly qualified name: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Web */ public static final String assemblyShortName = "System.Web"; /** * Qualified class name: System.Web.WebSockets.AspNetWebSocketContext */ public static final String className = "System.Web.WebSockets.AspNetWebSocketContext"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public AspNetWebSocketContext(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link AspNetWebSocketContext}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link AspNetWebSocketContext} instance * @throws java.lang.Throwable in case of error during cast operation */ public static AspNetWebSocketContext cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new AspNetWebSocketContext(from.getJCOInstance()); } // Constructors section public AspNetWebSocketContext() throws Throwable { } // Methods section // Properties section public boolean getIsClientConnected() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsClientConnected"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getIsDebuggingEnabled() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsDebuggingEnabled"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int getConnectionCount() throws Throwable, system.ArgumentException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Get("ConnectionCount"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public IDictionary getItems() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Items"); return new IDictionaryImplementation(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NameValueCollection getQueryString() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("QueryString"); return new NameValueCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NameValueCollection getServerVariables() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ServerVariables"); return new NameValueCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DateTime getTimestamp() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Timestamp"); return new DateTime(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public WindowsIdentity getLogonUserIdentity() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("LogonUserIdentity"); return new WindowsIdentity(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getAnonymousID() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("AnonymousID"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getApplicationPath() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("ApplicationPath"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getFilePath() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("FilePath"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getPath() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Path"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getPathInfo() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("PathInfo"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getRawUrl() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("RawUrl"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getUserAgent() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("UserAgent"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getUserHostAddress() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("UserHostAddress"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getUserHostName() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("UserHostName"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String[] getUserLanguages() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classInstance.Get("UserLanguages"); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } java.lang.String[] resultingArray = new java.lang.String[resultingArrayList.size()]; for(int indexUserLanguages = 0; indexUserLanguages < resultingArrayList.size(); indexUserLanguages++ ) { resultingArray[indexUserLanguages] = (java.lang.String)resultingArrayList.get(indexUserLanguages); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public Uri getUrlReferrer() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("UrlReferrer"); return new Uri(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Cache getCache() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Cache"); return new Cache(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HttpApplicationStateBase getApplication() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Application"); return new HttpApplicationStateBase(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HttpClientCertificate getClientCertificate() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ClientCertificate"); return new HttpClientCertificate(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HttpCookieCollection getCookies() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Cookies"); return new HttpCookieCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HttpServerUtilityBase getServer() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Server"); return new HttpServerUtilityBase(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ProfileBase getProfile() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Profile"); return new ProfileBase(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public UnvalidatedRequestValuesBase getUnvalidated() throws Throwable, system.NotImplementedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Unvalidated"); return new UnvalidatedRequestValuesBase(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy