Package system.diagnostics.tracing
Class EventSource
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.diagnostics.tracing.EventSource
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IJCOBridgeReflected
public class EventSource extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Diagnostics.Tracing.EventSource, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Diagnostics.Tracing.EventSource
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.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.String
assemblyShortName
Assembly name: System.Private.CoreLibstatic java.lang.String
className
Qualified class name: System.Diagnostics.Tracing.EventSourcestatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description EventSource()
EventSource(java.lang.Object instance)
Internal constructor.EventSource(java.lang.String eventSourceName)
EventSource(java.lang.String eventSourceName, EventSourceSettings config)
EventSource(java.lang.String eventSourceName, EventSourceSettings config, java.lang.String... traits)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventSource
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoEventSource
, a cast assert is made to check if types are compatible.void
close()
void
Dispose()
static java.lang.String
GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest)
static java.lang.String
GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest, EventManifestOptions flags)
NetException
getConstructionException()
static Guid
getCurrentThreadActivityId()
Guid
getGuid()
static Guid
GetGuid(NetType eventSourceType)
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 Typejava.lang.String
getName()
static java.lang.String
GetName(NetType eventSourceType)
EventSourceSettings
getSettings()
java.lang.String
GetTrait(java.lang.String key)
boolean
IsEnabled()
boolean
IsEnabled(EventLevel level, EventKeywords keywords)
boolean
IsEnabled(EventLevel level, EventKeywords keywords, EventChannel channel)
static void
SetCurrentThreadActivityId(Guid activityId)
static void
SetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue)
void
setJCOInstance(JCObject instance)
void
Write(java.lang.String eventName)
void
Write(java.lang.String eventName, EventSourceOptions options)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Diagnostics.Tracing.EventSource- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventSource
public EventSource(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
EventSource
public EventSource() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
EventSource
public EventSource(java.lang.String eventSourceName, EventSourceSettings config, java.lang.String... traits) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, IndexOutOfRangeException, OverflowException, FormatException, OutOfMemoryException, EventSourceException, KeyNotFoundException, AmbiguousMatchException, MissingMethodException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
IndexOutOfRangeException
OverflowException
FormatException
OutOfMemoryException
EventSourceException
KeyNotFoundException
AmbiguousMatchException
MissingMethodException
-
EventSource
public EventSource(java.lang.String eventSourceName, EventSourceSettings config) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, OverflowException, FormatException, OutOfMemoryException, EventSourceException, KeyNotFoundException, AmbiguousMatchException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
NotSupportedException
ObjectDisposedException
RankException
IndexOutOfRangeException
OverflowException
FormatException
OutOfMemoryException
EventSourceException
KeyNotFoundException
AmbiguousMatchException
-
EventSource
public EventSource(java.lang.String eventSourceName) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, CultureNotFoundException, OverflowException, FormatException, OutOfMemoryException, EventSourceException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
CultureNotFoundException
OverflowException
FormatException
OutOfMemoryException
EventSourceException
-
-
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 EventSource cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoEventSource
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
EventSource
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
IsEnabled
public boolean IsEnabled() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
IsEnabled
public boolean IsEnabled(EventLevel level, EventKeywords keywords, EventChannel channel) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
IsEnabled
public boolean IsEnabled(EventLevel level, EventKeywords keywords) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetGuid
public static Guid GetGuid(NetType eventSourceType) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, AmbiguousMatchException, CultureNotFoundException, OutOfMemoryException, ExternalException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, OverflowException, InvalidCastException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
AmbiguousMatchException
CultureNotFoundException
OutOfMemoryException
ExternalException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
OverflowException
InvalidCastException
-
GenerateManifest
public static java.lang.String GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest, EventManifestOptions flags) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, FormatException, AmbiguousMatchException, OutOfMemoryException, ExternalException, CultureNotFoundException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, OverflowException, InvalidCastException, KeyNotFoundException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
FormatException
AmbiguousMatchException
OutOfMemoryException
ExternalException
CultureNotFoundException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
OverflowException
InvalidCastException
KeyNotFoundException
-
GenerateManifest
public static java.lang.String GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, FormatException, AmbiguousMatchException, PlatformNotSupportedException, CultureNotFoundException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, OverflowException, InvalidCastException, ArrayTypeMismatchException, OutOfMemoryException, KeyNotFoundException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
FormatException
AmbiguousMatchException
PlatformNotSupportedException
CultureNotFoundException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
OverflowException
InvalidCastException
ArrayTypeMismatchException
OutOfMemoryException
KeyNotFoundException
-
GetName
public static java.lang.String GetName(NetType eventSourceType) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, FormatException, AmbiguousMatchException, PlatformNotSupportedException, OutOfMemoryException, ExternalException, CultureNotFoundException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, IndexOutOfRangeException, OverflowException, InvalidCastException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
FormatException
AmbiguousMatchException
PlatformNotSupportedException
OutOfMemoryException
ExternalException
CultureNotFoundException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
IndexOutOfRangeException
OverflowException
InvalidCastException
-
GetTrait
public java.lang.String GetTrait(java.lang.String key) throws java.lang.Throwable, NotSupportedException, ArgumentException, PlatformNotSupportedException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
PlatformNotSupportedException
-
Dispose
public void Dispose() throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, OutOfMemoryException, InvalidOperationException, FormatException, KeyNotFoundException, EventSourceException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, OutOfMemoryException, EventSourceException, CultureNotFoundException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, OutOfMemoryException, EventSourceException, CultureNotFoundException
-
Write
public void Write(java.lang.String eventName, EventSourceOptions options) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, InvalidOperationException, NotSupportedException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
Write
public void Write(java.lang.String eventName) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, PlatformNotSupportedException, ArgumentNullException, InvalidOperationException, NotSupportedException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
getSettings
public EventSourceSettings getSettings() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getConstructionException
public NetException getConstructionException() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getCurrentThreadActivityId
public static Guid getCurrentThreadActivityId() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getGuid
public Guid getGuid() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getName
public java.lang.String getName() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-