CounterFactory (Mule ESB 2.2.1 API)
Keywords: org.mule.util.counters.CounterFactory class

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

## org.mule.util.counters
Class CounterFactory

    java.lang.Object
      org.mule.util.counters.CounterFactory

    public final class CounterFactory

extends Object

This class is the Counter's factory. It is the main entry point for operations on counters. The user can:

- retrieve a counter by its name
- create a counter
- retrieve a list of public counters

Nested Class Summary
`static class` | `CounterFactory.Type` Enum class for all different types of counters.

Method Summary
`static Counter` | `createCounter(String name, CounterFactory.Type type)` Create a new public counter of the given type.
`static Counter` | `createCounter(String name, CounterFactory.Type type, boolean visible)` Create a new counter of the given type and visibility.
`static Counter` | `createCounter(String name, String base, CounterFactory.Type type)` Create a new public aggregate counter of the given type.
`static Counter` | `createCounter(String name, String base, CounterFactory.Type type, boolean visible)` Create a new aggregate counter of the given type and visibility.
`static Counter` | `createCounter(String name, String first, String second, CounterFactory.Type type)` Create a new public aggregate counter of the given type.
`static Counter` | `createCounter(String name, String first, String second, CounterFactory.Type type, boolean visible)` Create a new aggregate counter of the given type and visibility.
`static Counter` | `getCounter(String name)` Search the defined counters for a counter of the given name.
`static Iterator` | `getCounters()` Retrieve an iterator giving the list of public defined counters.

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

Method Detail

### getCounter

    public static Counter getCounter(String name)

  Search the defined counters for a counter of the given name.

  Parameters:
    `name` - the name of the counter to retrieve
  Returns:
    the counter

### createCounter

    public static Counter createCounter(String name,
                                        CounterFactory.Type type)

  Create a new public counter of the given type.

  Parameters:
    `name` - the name of the counter to create
    `type` - the type of the counter
  Returns:
    the newly created counter

### createCounter

    public static Counter createCounter(String name,
                                        CounterFactory.Type type,
                                        boolean visible)

  Create a new counter of the given type and visibility.

  Parameters:
    `name` - the name of the counter to create
    `type` - the type of the counter
    `visible` - boolean specifying if the counter is public or not
  Returns:
    the newly created counter

### createCounter

    public static Counter createCounter(String name,
                                        String base,
                                        CounterFactory.Type type)

  Create a new public aggregate counter of the given type.

  Parameters:
    `name` - the name of the counter to create
    `base` - the name of the counter to use for computation
    `type` - the type of the counter
  Returns:
    the newly created counter

### createCounter

    public static Counter createCounter(String name,
                                        String base,
                                        CounterFactory.Type type,
                                        boolean visible)

  Create a new aggregate counter of the given type and visibility.

  Parameters:
    `name` - the name of the counter to create
    `base` - the name of the counter to use for computation
    `type` - the type of the counter
    `visible` - boolean specifying if the counter is public or not
  Returns:
    the newly created counter

### createCounter

    public static Counter createCounter(String name,
                                        String first,
                                        String second,
                                        CounterFactory.Type type)

  Create a new public aggregate counter of the given type.

  Parameters:
    `name` - the name of the counter to create
    `first` - the name of the first counter to use for computation
    `second` - the name of the first counter to use for computation
    `type` - the type of the counter
  Returns:
    the newly created counter

### createCounter

    public static Counter createCounter(String name,
                                        String first,
                                        String second,
                                        CounterFactory.Type type,
                                        boolean visible)

  Create a new aggregate counter of the given type and visibility.

  Parameters:
    `name` - the name of the counter to create
    `first` - the name of the first counter to use for computation
    `second` - the name of the first counter to use for computation
    `type` - the type of the counter
    `visible` - boolean specifying if the counter is public or not
  Returns:
    the newly created counter

### getCounters

    public static Iterator getCounters()

  Retrieve an iterator giving the list of public defined counters.

  Returns:
    an iterator to walk throught the list of public defined counters

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

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.