Package system.net.sockets
Class TcpListener
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.net.sockets.TcpListener
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class TcpListener extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Net.Sockets.TcpListener, System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Sockets.TcpListener
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.StringassemblyShortNameAssembly name: System.Net.Socketsstatic java.lang.StringclassNameQualified class name: System.Net.Sockets.TcpListenerstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description TcpListener()TcpListener(int port)TcpListener(java.lang.Object instance)Internal constructor.TcpListener(IPAddress localaddr, int port)TcpListener(IPEndPoint localEP)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketAcceptSocket()TcpClientAcceptTcpClient()voidAllowNatTraversal(boolean allowed)IAsyncResultBeginAcceptSocket(AsyncCallback callback, NetObject state)IAsyncResultBeginAcceptTcpClient(AsyncCallback callback, NetObject state)static TcpListenercast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoTcpListener, a cast assert is made to check if types are compatible.voidclose()static TcpListenerCreate(int port)voidDispose()SocketEndAcceptSocket(IAsyncResult asyncResult)TcpClientEndAcceptTcpClient(IAsyncResult asyncResult)booleangetExclusiveAddressUse()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class TypeEndPointgetLocalEndpoint()SocketgetServer()booleanPending()voidsetExclusiveAddressUse(boolean ExclusiveAddressUse)voidsetJCOInstance(JCObject instance)voidStart()voidStart(int backlog)voidStop()
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Net.Sockets- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.Sockets.TcpListener- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TcpListener
public TcpListener(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
TcpListener
public TcpListener() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
TcpListener
public TcpListener(int port) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionCultureNotFoundExceptionObjectDisposedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketException
-
TcpListener
public TcpListener(IPAddress localaddr, int port) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, OutOfMemoryException, IndexOutOfRangeException, FormatException, EventSourceException, SocketException, ArgumentNullException, ObjectDisposedException
-
TcpListener
public TcpListener(IPEndPoint localEP) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, InvalidOperationException, ArgumentException, ArgumentOutOfRangeException, OutOfMemoryException, IndexOutOfRangeException, FormatException, EventSourceException, SocketException, ArgumentNullException, ObjectDisposedException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static TcpListener cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoTcpListener, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
TcpListenerinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
Pending
public boolean Pending() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, NotSupportedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionNotSupportedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketException
-
BeginAcceptSocket
public IAsyncResult BeginAcceptSocket(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, ArrayTypeMismatchException, SocketException, EventSourceException
-
BeginAcceptTcpClient
public IAsyncResult BeginAcceptTcpClient(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, ArrayTypeMismatchException, SocketException, EventSourceException
-
AcceptSocket
public Socket AcceptSocket() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, SocketException, OutOfMemoryException, FormatException, IndexOutOfRangeException, NotSupportedException, ArrayTypeMismatchException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionSocketExceptionOutOfMemoryExceptionFormatExceptionIndexOutOfRangeExceptionNotSupportedExceptionArrayTypeMismatchException
-
EndAcceptSocket
public Socket EndAcceptSocket(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, TaskSchedulerException, PlatformNotSupportedException, TaskCanceledException, ArgumentOutOfRangeException, AggregateException, ObjectDisposedException
-
AcceptTcpClient
public TcpClient AcceptTcpClient() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, SocketException, OutOfMemoryException, FormatException, IndexOutOfRangeException, NotSupportedException, ArrayTypeMismatchException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionSocketExceptionOutOfMemoryExceptionFormatExceptionIndexOutOfRangeExceptionNotSupportedExceptionArrayTypeMismatchException
-
EndAcceptTcpClient
public TcpClient EndAcceptTcpClient(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, TaskSchedulerException, PlatformNotSupportedException, TaskCanceledException, ArgumentOutOfRangeException, AggregateException, ObjectDisposedException
-
Create
public static TcpListener Create(int port) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionCultureNotFoundExceptionObjectDisposedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketException
-
AllowNatTraversal
public void AllowNatTraversal(boolean allowed) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, OutOfMemoryException, SocketException, NotSupportedException
-
Dispose
public void Dispose() throws java.lang.Throwable, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, ArgumentException, FormatException, ArgumentOutOfRangeException, EventSourceException, ObjectDisposedException, ArrayTypeMismatchException
-
Start
public void Start() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException, OutOfMemoryException, EventSourceException, SocketException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionNotSupportedExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionEventSourceExceptionSocketException
-
Start
public void Start(int backlog) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, SocketException- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionSocketException
-
Stop
public void Stop() throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, FormatException, ArgumentOutOfRangeException, EventSourceException, ObjectDisposedException, ArrayTypeMismatchException- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionInvalidOperationExceptionFormatExceptionArgumentOutOfRangeExceptionEventSourceExceptionObjectDisposedExceptionArrayTypeMismatchException
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getExclusiveAddressUse
public boolean getExclusiveAddressUse() throws java.lang.Throwable, ObjectDisposedException, PlatformNotSupportedException, ArgumentNullException, OutOfMemoryException, ArgumentOutOfRangeException, ArgumentException, FormatException, InvalidOperationException, EventSourceException, SocketException
-
setExclusiveAddressUse
public void setExclusiveAddressUse(boolean ExclusiveAddressUse) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException, OutOfMemoryException, FormatException, EventSourceException, ArrayTypeMismatchException, SocketException- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionObjectDisposedExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionEventSourceExceptionArrayTypeMismatchExceptionSocketException
-
getLocalEndpoint
public EndPoint getLocalEndpoint() throws java.lang.Throwable, NotSupportedException, ArgumentException, ObjectDisposedException, SocketException, OutOfMemoryException, PlatformNotSupportedException, InvalidOperationException, FormatException, EventSourceException, ArgumentNullException, ArgumentOutOfRangeException, ArrayTypeMismatchException
-
getServer
public Socket getServer() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, IndexOutOfRangeException, OutOfMemoryException, NotSupportedException, InvalidOperationException, FormatException, EventSourceException, SocketException, ObjectDisposedException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionNotSupportedExceptionInvalidOperationExceptionFormatExceptionEventSourceExceptionSocketExceptionObjectDisposedException
-
-