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.String
assemblyFullName
Fully assembly qualified name: System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Net.Socketsstatic java.lang.String
className
Qualified class name: System.Net.Sockets.TcpListenerstatic JCType
classType
The 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 Socket
AcceptSocket()
TcpClient
AcceptTcpClient()
void
AllowNatTraversal(boolean allowed)
IAsyncResult
BeginAcceptSocket(AsyncCallback callback, NetObject state)
IAsyncResult
BeginAcceptTcpClient(AsyncCallback callback, NetObject state)
static TcpListener
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoTcpListener
, a cast assert is made to check if types are compatible.void
close()
static TcpListener
Create(int port)
void
Dispose()
Socket
EndAcceptSocket(IAsyncResult asyncResult)
TcpClient
EndAcceptTcpClient(IAsyncResult asyncResult)
boolean
getExclusiveAddressUse()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeEndPoint
getLocalEndpoint()
Socket
getServer()
boolean
Pending()
void
setExclusiveAddressUse(boolean ExclusiveAddressUse)
void
setJCOInstance(JCObject instance)
void
Start()
void
Start(int backlog)
void
Stop()
-
-
-
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.Throwable
Internal 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.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
SocketException
-
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:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static TcpListener cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoTcpListener
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
TcpListener
instance- 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.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
NotSupportedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
SocketException
-
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.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
SocketException
OutOfMemoryException
FormatException
IndexOutOfRangeException
NotSupportedException
ArrayTypeMismatchException
-
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.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
SocketException
OutOfMemoryException
FormatException
IndexOutOfRangeException
NotSupportedException
ArrayTypeMismatchException
-
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.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
SocketException
-
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.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
IndexOutOfRangeException
FormatException
OutOfMemoryException
EventSourceException
SocketException
-
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.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
SocketException
-
Stop
public void Stop() throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, FormatException, ArgumentOutOfRangeException, EventSourceException, ObjectDisposedException, ArrayTypeMismatchException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
PlatformNotSupportedException
IndexOutOfRangeException
OutOfMemoryException
InvalidOperationException
FormatException
ArgumentOutOfRangeException
EventSourceException
ObjectDisposedException
ArrayTypeMismatchException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in 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.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ObjectDisposedException
IndexOutOfRangeException
OutOfMemoryException
FormatException
EventSourceException
ArrayTypeMismatchException
SocketException
-
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.Throwable
ArgumentNullException
ArgumentException
PlatformNotSupportedException
ArgumentOutOfRangeException
CultureNotFoundException
IndexOutOfRangeException
OutOfMemoryException
NotSupportedException
InvalidOperationException
FormatException
EventSourceException
SocketException
ObjectDisposedException
-
-