OpenNMS API 1.2.9

## org.opennms.netmgt.mock
Class MockUtil

    java.lang.Object
      org.opennms.netmgt.mock.MockUtil

public class MockUtil
extends java.lang.Object

Author:
  brozow TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
`private static org.apache.log4j.Level` `m_logLevel`
`private static boolean` `s_loggingSetup`

Constructor Summary
`MockUtil()`

Method Summary
`static void` `addEventParm(Event event, java.lang.String parmName, int parmValue)`
`static void` `addEventParm(Event event, java.lang.String parmName, java.lang.String parmValue)`
`static java.sql.Timestamp` `convertEventTimeIntoTimestamp(java.lang.String eventTime)`
`static Event` `createEvent(java.lang.String source, java.lang.String uei)`
`static Event` `createEvent(java.lang.String source, java.lang.String uei, int nodeId, java.lang.String ipAddr, java.lang.String svcName)`
`static Event` `createInterfaceDeletedEvent(java.lang.String source, MockInterface iface)`
`static Event` `createInterfaceDownEvent(java.lang.String source, MockInterface iface)`
`static Event` `createInterfaceEvent(java.lang.String source, java.lang.String uei, MockInterface iface)`
`static Event` `createInterfaceUpEvent(java.lang.String source, MockInterface iface)`
`static Event` `createNodeDeletedEvent(java.lang.String source, MockNode node)`
`static Event` `createNodeDownEvent(java.lang.String source, MockNode node)`
`static Event` `createNodeEvent(java.lang.String source, java.lang.String uei, MockNode node)`
`static Event` `createNodeGainedServiceEvent(java.lang.String source, MockService svc)`
`static Event` `createNodeLostServiceEvent(java.lang.String source, MockService svc)`
`static Event` `createNodeRegainedServiceEvent(java.lang.String source, MockService svc)`
`static Event` `createNodeUpEvent(java.lang.String source, MockNode node)`
`static Event` `createReparentEvent(java.lang.String source, java.lang.String ipAddr, int oldNode, int newNode)`
`static Event` `createResumePollingServiceEvent(java.lang.String source, MockService svc)`
`static Event` `createServiceDeletedEvent(java.lang.String source, MockService svc)`
`static Event` `createServiceEvent(java.lang.String source, java.lang.String uei, MockService svc)`
`static Event` `createServiceResponsiveEvent(java.lang.String source, MockService svc)`
`static Event` `createServiceUnresponsiveEvent(java.lang.String source, MockService svc)`
`static Event` `createSuspendPollingServiceEvent(java.lang.String source, MockService svc)`
`static boolean` `eventsMatch(Event e1, Event e2)`
`static boolean` `noWarningsOrHigherLogged()`
`(package private) static boolean` `printEnabled()`
`static void` `printEvent(java.lang.String prefix, Event event)`
`static void` `printEvents(java.lang.String prefix, java.util.Collection events)`
`static void` `println(java.lang.String string)`
`static void` `receivedLogLevel(org.apache.log4j.Level level)`
`static void` `resetLogLevel()`
`static void` `setEventTime(Event event, java.util.Date date)`
`static void` `setupLogging()`
`static void` `setupLogging(boolean toConsole)`

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

Field Detail

### s_loggingSetup

    private static boolean s_loggingSetup

### m_logLevel

    private static org.apache.log4j.Level m_logLevel

Constructor Detail

### MockUtil

    public MockUtil()

Method Detail

### addEventParm

    public static void addEventParm(Event event,
                                    java.lang.String parmName,
                                    int parmValue)

### addEventParm

    public static void addEventParm(Event event,
                                    java.lang.String parmName,
                                    java.lang.String parmValue)

### createNodeLostServiceEvent

    public static Event createNodeLostServiceEvent(java.lang.String source,
                                                   MockService svc)

### createNodeRegainedServiceEvent

    public static Event createNodeRegainedServiceEvent(java.lang.String source,
                                                       MockService svc)

### createServiceUnresponsiveEvent

    public static Event createServiceUnresponsiveEvent(java.lang.String source,
                                                       MockService svc)

### createServiceResponsiveEvent

    public static Event createServiceResponsiveEvent(java.lang.String source,
                                                     MockService svc)

### createNodeGainedServiceEvent

    public static Event createNodeGainedServiceEvent(java.lang.String source,
                                                     MockService svc)

### createServiceDeletedEvent

    public static Event createServiceDeletedEvent(java.lang.String source,
                                                  MockService svc)

### createSuspendPollingServiceEvent

    public static Event createSuspendPollingServiceEvent(java.lang.String source,
                                                         MockService svc)

### createResumePollingServiceEvent

    public static Event createResumePollingServiceEvent(java.lang.String source,
                                                        MockService svc)

### createServiceEvent

    public static Event createServiceEvent(java.lang.String source,
                                           java.lang.String uei,
                                           MockService svc)

### createInterfaceDownEvent

    public static Event createInterfaceDownEvent(java.lang.String source,
                                                 MockInterface iface)

### createInterfaceUpEvent

    public static Event createInterfaceUpEvent(java.lang.String source,
                                               MockInterface iface)

### createInterfaceDeletedEvent

    public static Event createInterfaceDeletedEvent(java.lang.String source,
                                                    MockInterface iface)

### createInterfaceEvent

    public static Event createInterfaceEvent(java.lang.String source,
                                             java.lang.String uei,
                                             MockInterface iface)

### createNodeDownEvent

    public static Event createNodeDownEvent(java.lang.String source,
                                            MockNode node)

### createNodeUpEvent

    public static Event createNodeUpEvent(java.lang.String source,
                                          MockNode node)

### createNodeDeletedEvent

    public static Event createNodeDeletedEvent(java.lang.String source,
                                               MockNode node)

### createNodeEvent

    public static Event createNodeEvent(java.lang.String source,
                                        java.lang.String uei,
                                        MockNode node)

### setEventTime

    public static void setEventTime(Event event,
                                    java.util.Date date)

### createEvent

    public static Event createEvent(java.lang.String source,
                                    java.lang.String uei,
                                    int nodeId,
                                    java.lang.String ipAddr,
                                    java.lang.String svcName)

### createEvent

    public static Event createEvent(java.lang.String source,
                                    java.lang.String uei)

### createReparentEvent

    public static Event createReparentEvent(java.lang.String source,
                                            java.lang.String ipAddr,
                                            int oldNode,
                                            int newNode)

### convertEventTimeIntoTimestamp

    public static java.sql.Timestamp convertEventTimeIntoTimestamp(java.lang.String eventTime)

### eventsMatch

    public static boolean eventsMatch(Event e1,
                                      Event e2)

### setupLogging

    public static void setupLogging()

### setupLogging

    public static void setupLogging(boolean toConsole)

### printEnabled

    static boolean printEnabled()

### printEvent

    public static void printEvent(java.lang.String prefix,
                                  Event event)

### printEvents

    public static void printEvents(java.lang.String prefix,
                                   java.util.Collection events)

### resetLogLevel

    public static void resetLogLevel()

### receivedLogLevel

    public static void receivedLogLevel(org.apache.log4j.Level level)

### noWarningsOrHigherLogged

    public static boolean noWarningsOrHigherLogged()

### println

    public static void println(java.lang.String string)

  Parameters:
    `string` -

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.