public void Unsubscribe(JvmEventType eventType)
        {
            if (!_subscribedEvents.Remove(eventType))
            {
                return;
            }

            if (_subscribedEvents.Count >= 1)
            {
                return;
            }

            JvmEnvironment environment = JvmEnvironment.GetCurrentInstance();

            environment.EventManager.RemoveProcessor(this);
        }
        public void Subscribe(JvmEventType eventType)
        {
            if (!_subscribedEvents.Add(eventType))
            {
                return;
            }

            if (_subscribedEvents.Count > 1)
            {
                return;
            }

            _subscriber = OperationContext.Current.GetCallbackChannel <IJvmEvents>();
            JvmEnvironment environment = JvmEnvironment.GetCurrentInstance();

            environment.EventManager.AddProcessor(this);
        }
Exemple #3
0
 public jvmtiError SetEventNotificationMode(JvmEventMode mode, JvmEventType eventType)
 {
     return(RawInterface.SetEventNotificationMode(this, mode, eventType, jthread.Null));
 }
Exemple #4
0
 public void GenerateEvents(JvmEventType eventType)
 {
     ThrowOnFailure(_rawInterface.GenerateEvents(_env, eventType));
 }
Exemple #5
0
        public void SetEventNotificationMode(JvmEventMode mode, JvmEventType eventType, JvmThreadReference eventThread)
        {
            jthread eventThreadHandle = (jthread)eventThread;

            ThrowOnFailure(_rawInterface.SetEventNotificationMode(_env, mode, eventType, eventThreadHandle));
        }
Exemple #6
0
 public void SetEventNotificationMode(JvmEventMode mode, JvmEventType eventType)
 {
     SetEventNotificationMode(mode, eventType, default(JvmThreadReference));
 }
 public jvmtiError SetEventNotificationMode(JvmEventMode mode, JvmEventType eventType)
 {
     return RawInterface.SetEventNotificationMode(this, mode, eventType, jthread.Null);
 }