com.h3c.of.lib

## Class AbstractFactory

- java.lang.Object
- - com.h3c.of.lib.AbstractFactory

- Direct Known Subclasses:
    ActionFactory, BucketFactory, FieldFactory, HelloElementFactory, InstructionFactory, MatchFactory, MessageFactory, MeterBandFactory, MpBodyFactory, PortFactory, QueueFactory, TableFeatureFactory

      public abstract class AbstractFactory
      extends Object

  Provides a base implementation for all the factory classes out there.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MessageParseException` | `mpe(OfPacketReader pkt)` Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null message and null exception.
    `MessageParseException` | `mpe(OfPacketReader pkt, Exception e)` Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null message.
    `MessageParseException` | `mpe(OfPacketReader pkt, String msg)` Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null exception.
    `MessageParseException` | `mpe(OfPacketReader pkt, String msg, Exception e)` Returns a message parse exception with debugging information.
    `protected abstract String` | `tag()` Subclasses should return a short identifying string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractFactory

          public AbstractFactory()

  - ### Method Detail

    - #### mpe

          public MessageParseException mpe(OfPacketReader pkt,
                                  String msg,
                                  Exception e)

      Returns a message parse exception with debugging information.
      Parameters:
        `pkt` - the packet buffer being parsed at the time of the exception
        `msg` - additional detail message (may be null)
        `e` - the causing exception (may be null)
      Returns:
        a ready-to-throw MessageParseException

    - #### mpe

          public MessageParseException mpe(OfPacketReader pkt,
                                  Exception e)

      Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null message.
      Parameters:
        `pkt` - the packet buffer being parsed at the time of the exception
        `e` - the causing exception (may be null)
      Returns:
        a ready-to-throw MessageParseException

    - #### mpe

          public MessageParseException mpe(OfPacketReader pkt,
                                  String msg)

      Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null exception.
      Parameters:
        `pkt` - the packet buffer being parsed at the time of the exception
        `msg` - additional detail message (may be null)
      Returns:
        a ready-to-throw MessageParseException

    - #### mpe

          public MessageParseException mpe(OfPacketReader pkt)

      Convenience method delegating to `mpe(OfPacketReader, String, Exception)` with a null message and null exception.
      Parameters:
        `pkt` - the packet buffer being parsed at the time of the exception
      Returns:
        a ready-to-throw MessageParseException

    - #### tag

          protected abstract String tag()

      Subclasses should return a short identifying string. This is used in exception messages generated by `mpe(com.h3c.of.lib.OfPacketReader, java.lang.String, java.lang.Exception)`.
      Returns:
        a short identifying string

Copyright © 2014. All Rights Reserved.