Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.msk
Class CallTracer

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.msk.CallTracer

All Implemented Interfaces:
  NewContactListener, ExitedContactListener

    public class CallTracer

extends Object
implements ExitedContactListener, NewContactListener

Observer sending any notified call to a contact trace facility. An object of this class is constructed using a `ContactTrace` instance as well as a `SimLogic` object. Each time a call exits the simulated system, a line is written to the associated trace, using information obtained from the contact object, and the simulation logic.

Constructor Summary
`CallTracer(SimLogic simLogic, ContactTrace trace)` Creates a new call tracer from the given simulation logic and trace.

Method Summary
`void` | `blocked(Router router, Contact contact, int type)` This method is called when the contact `contact` is blocked in the router `router`.
`void` | `dequeued(Router router, DequeueEvent ev)` This method is called when a contact leaves a waiting queue linked to the router `router`, without being served.
`ContactTrace` | `getContactTrace()` Returns the associated facility for contact-by-contact trace.
`SimLogic` | `getSimLogic()` Returns the simulation logic associated with this call tracer.
`void` | `newContact(Contact contact)` Notifies the listener about a new contact `contact`.
`void` | `register()` Registers this call tracer with the model associated with the simulation logic returned by `getSimLogic()`.
`void` | `served(Router router, EndServiceEvent ev)` This method is called when a contact was served by an agent.
`void` | `unregister()` Unregisters this call tracer with the model associated with the simulation logic returned by `getSimLogic()`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CallTracer

    public CallTracer(SimLogic simLogic,
                      ContactTrace trace)

  Creates a new call tracer from the given simulation logic and trace.

  Parameters:
    `simLogic` - the simulation logic used to get step and period for the trace.
    `trace` - the object representing the call-by-call trace facility.

Method Detail

### getSimLogic

    public SimLogic getSimLogic()

  Returns the simulation logic associated with this call tracer.

### getContactTrace

    public ContactTrace getContactTrace()

  Returns the associated facility for contact-by-contact trace.

### blocked

    public void blocked(Router router,
                        Contact contact,
                        int type)

  Description copied from interface: `ExitedContactListener`
  This method is called when the contact `contact` is blocked in the router `router`. The integer `bType` is used to indicate the reason of the blocking, e.g., the contact could not be served or put into any waiting queue.

  Specified by:
    `blocked` in interface `ExitedContactListener`
  Parameters:
    `router` - the router causing the blocking.
    `contact` - the blocked contact.
    `type` - an indicator giving the reason why the contact is blocked.

### dequeued

    public void dequeued(Router router,
                         DequeueEvent ev)

  Description copied from interface: `ExitedContactListener`
  This method is called when a contact leaves a waiting queue linked to the router `router`, without being served.

  Specified by:
    `dequeued` in interface `ExitedContactListener`
  Parameters:
    `router` - the router causing the dequeueing.
    `ev` - the dequeue event.

### served

    public void served(Router router,
                       EndServiceEvent ev)

  Description copied from interface: `ExitedContactListener`
  This method is called when a contact was served by an agent. This method is called by the router before the after-contact work begins so `ev` does not contain the information about after-contact time.

  Specified by:
    `served` in interface `ExitedContactListener`
  Parameters:
    `router` - the router managing the contact.
    `ev` - the end service event.

### newContact

    public void newContact(Contact contact)

  Description copied from interface: `NewContactListener`
  Notifies the listener about a new contact `contact`. The given contact object can be assumed non-`null`, and may be stored or processed in any needed ways.

  Specified by:
    `newContact` in interface `NewContactListener`
  Parameters:
    `contact` - the new contact.

### register

    public void register()

  Registers this call tracer with the model associated with the simulation logic returned by `getSimLogic()`. After this method is called, this listener is notified about every contact leaving the simulated system as well as any failed outbound call.

### unregister

    public void unregister()

  Unregisters this call tracer with the model associated with the simulation logic returned by `getSimLogic()`.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.