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=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e.See: https://docs.microsoft.com/en-us/dotnet/api/System.Diagnostics.Tracing.EventSource
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.StringassemblyShortNameAssembly name: System.Private.CoreLibstatic java.lang.StringclassNameQualified class name: System.Diagnostics.Tracing.EventSourcestatic JCTypeclassTypeThe 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 EventSourcecast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoEventSource, a cast assert is made to check if types are compatible.voidclose()voidDispose()static java.lang.StringGenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest)static java.lang.StringGenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest, EventManifestOptions flags)NetExceptiongetConstructionException()static GuidgetCurrentThreadActivityId()GuidgetGuid()static GuidGetGuid(NetType eventSourceType)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 Typejava.lang.StringgetName()static java.lang.StringGetName(NetType eventSourceType)EventSourceSettingsgetSettings()java.lang.StringGetTrait(java.lang.String key)booleanIsEnabled()booleanIsEnabled(EventLevel level, EventKeywords keywords)booleanIsEnabled(EventLevel level, EventKeywords keywords, EventChannel channel)static voidSetCurrentThreadActivityId(Guid activityId)static voidSetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue)voidsetJCOInstance(JCObject instance)voidWrite(java.lang.String eventName)voidWrite(java.lang.String eventName, EventSourceOptions options)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=5.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.ThrowableInternal 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, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, OverflowException, FormatException, ArrayTypeMismatchException, OutOfMemoryException, SecurityException, IOException, EventSourceException, MulticastNotSupportedException, MissingMethodException, KeyNotFoundException- Throws:
java.lang.ThrowableArgumentExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionCultureNotFoundExceptionOverflowExceptionFormatExceptionArrayTypeMismatchExceptionOutOfMemoryExceptionSecurityExceptionIOExceptionEventSourceExceptionMulticastNotSupportedExceptionMissingMethodExceptionKeyNotFoundException
-
EventSource
public EventSource(java.lang.String eventSourceName, EventSourceSettings config) throws java.lang.Throwable, NotSupportedException, ArgumentNullException, CultureNotFoundException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArgumentException, FormatException, OverflowException, ArrayTypeMismatchException, OutOfMemoryException, SecurityException, IOException, EventSourceException, MulticastNotSupportedException- Throws:
java.lang.ThrowableNotSupportedExceptionArgumentNullExceptionCultureNotFoundExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArgumentExceptionFormatExceptionOverflowExceptionArrayTypeMismatchExceptionOutOfMemoryExceptionSecurityExceptionIOExceptionEventSourceExceptionMulticastNotSupportedException
-
EventSource
public EventSource(java.lang.String eventSourceName) throws java.lang.Throwable, ArgumentNullException, CultureNotFoundException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArgumentException, FormatException, IndexOutOfRangeException, OverflowException, SecurityException, IOException, MulticastNotSupportedException, OutOfMemoryException, NotSupportedException- Throws:
java.lang.ThrowableArgumentNullExceptionCultureNotFoundExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArgumentExceptionFormatExceptionIndexOutOfRangeExceptionOverflowExceptionSecurityExceptionIOExceptionMulticastNotSupportedExceptionOutOfMemoryExceptionNotSupportedException
-
-
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 EventSource cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoEventSource, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
EventSourceinstance- 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, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, ArrayTypeMismatchException, CultureNotFoundException, OutOfMemoryException, ExternalException, MissingMethodException, TargetInvocationException, InvalidCastException, OverflowException, FormatException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionArrayTypeMismatchExceptionCultureNotFoundExceptionOutOfMemoryExceptionExternalExceptionMissingMethodExceptionTargetInvocationExceptionInvalidCastExceptionOverflowExceptionFormatException
-
GenerateManifest
public static java.lang.String GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest, EventManifestOptions flags) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, ArrayTypeMismatchException, OutOfMemoryException, ExternalException, MissingMethodException, TargetInvocationException, InvalidCastException, OverflowException, FormatException, KeyNotFoundException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionArgumentNullExceptionInvalidOperationExceptionPlatformNotSupportedExceptionIndexOutOfRangeExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionArrayTypeMismatchExceptionOutOfMemoryExceptionExternalExceptionMissingMethodExceptionTargetInvocationExceptionInvalidCastExceptionOverflowExceptionFormatExceptionKeyNotFoundException
-
GenerateManifest
public static java.lang.String GenerateManifest(NetType eventSourceType, java.lang.String assemblyPathToIncludeInManifest) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, CultureNotFoundException, MissingMethodException, TargetInvocationException, InvalidCastException, OverflowException, FormatException, OutOfMemoryException, KeyNotFoundException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionCultureNotFoundExceptionMissingMethodExceptionTargetInvocationExceptionInvalidCastExceptionOverflowExceptionFormatExceptionOutOfMemoryExceptionKeyNotFoundException
-
GetName
public static java.lang.String GetName(NetType eventSourceType) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, PlatformNotSupportedException, OutOfMemoryException, ExternalException, CultureNotFoundException, MissingMethodException, TargetInvocationException, InvalidCastException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionNotSupportedExceptionArgumentNullExceptionObjectDisposedExceptionInvalidOperationExceptionRankExceptionArrayTypeMismatchExceptionPlatformNotSupportedExceptionOutOfMemoryExceptionExternalExceptionCultureNotFoundExceptionMissingMethodExceptionTargetInvocationExceptionInvalidCastException
-
GetTrait
public java.lang.String GetTrait(java.lang.String key) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, IndexOutOfRangeException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionIndexOutOfRangeException
-
Dispose
public void Dispose() throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, FormatException, OutOfMemoryException, KeyNotFoundException, EventSourceException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, FormatException, EventSourceException, OutOfMemoryException, CultureNotFoundException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId) throws java.lang.Throwable, ArgumentException, IndexOutOfRangeException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, FormatException, EventSourceException, OutOfMemoryException, CultureNotFoundException
-
Write
public void Write(java.lang.String eventName, EventSourceOptions options) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, InvalidOperationException, NotSupportedException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
Write
public void Write(java.lang.String eventName) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, InvalidOperationException, NotSupportedException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
close
public void close() throws java.lang.Exception- Specified by:
closein 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
-
-