com.sun.jini.norm.event

Class EventTypeGenerator

    • Field Detail

      • nextEvID

        private long nextEvID
        Next event ID.
      • taskManager

        private transient TaskManager taskManager
        Task manager used to send events
      • wakeupManager

        private transient WakeupManager wakeupManager
        Wakeup manager used by the event sending tasks to schedule retries.
    • Constructor Detail

      • EventTypeGenerator

        public EventTypeGenerator()
    • Method Detail

      • newEventType

        public EventType newEventType(SendMonitor monitor)
                               throws IOException
        Create a new EventType object. The event ID for this type will be generated by this call.
        Parameters:
        monitor - Object to callback when an event sending attempt fails with a definite exception and to ensure that the lease on the event is still current. May not be null.
        Returns:
        the new EventType object
        Throws:
        IOException - if listener cannot be serialized
      • newEventType

        public EventType newEventType(SendMonitor monitor,
                             long eventID)
                               throws IOException
        Create a new EventType object specify the event id it should have.
        Parameters:
        eventID - the event ID of this type
        monitor - Object to callback when an event sending attempt fails with a definite exception and to ensure that the lease on the event is still current. May not be null.
        Returns:
        the new EventType object
        Throws:
        IOException - if listener cannot be serialized
      • recoverEventID

        void recoverEventID(long evID)
        Called by event types during transient state recovery to ensure the generator knows about there event ID.

        Note: this method is not synchronized.

        Parameters:
        evID - event ID of recovered EventType object
      • getTaskManager

        TaskManager getTaskManager()
        Return the task manager that EventType objects created by this generator should use to send their events.
      • getWakeupManager

        WakeupManager getWakeupManager()
        Return the wakeup manager that EventType objects created by this generator should use to send their events.
      • terminate

        public void terminate()
        Terminate any independent treads started by event types associated with this generator.

Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.