OpenNMS API 1.2.9

## org.opennms.netmgt.eventd.adaptors.tcp
Interface TcpEventReceiverMBean

All Known Implementing Classes:
  TcpEventReceiver

public interface TcpEventReceiverMBean

Method Summary
`void` `addEventHandler(java.lang.String name)` Adds a new event handler by its managed name.
`void` `destroy()` Invoked prior to garbage collection.
`java.lang.Integer` `getPort()` Returns the where a listener is waiting to process new request.
`int` `getStatus()` The current status of the managed bean.
`void` `init()` Invoked prior to start
`void` `removeEventHandler(java.lang.String name)` Removes an event handler.
`void` `setEventsPerConnection(java.lang.Integer number)` The number of event records a new connection is allowed to send before the connection is terminated by the server.
`void` `setLogPrefix(java.lang.String prefix)` The logging prefix to use
`void` `setPort(java.lang.Integer port)` Sets the port where new requests will be handled.
`void` `start()` Starts the current managed bean.
`void` `stop()` Stops the current managed bean.

Method Detail

### start

    public void start()

  Starts the current managed bean.

### stop

    public void stop()

  Stops the current managed bean.

### init

    public void init()

  Invoked prior to start

### destroy

    public void destroy()

  Invoked prior to garbage collection.

### getStatus

    public int getStatus()

  The current status of the managed bean. This is a representation of the managed bean's run state as defined by the `Fiber` interface.

### setPort

    public void setPort(java.lang.Integer port)

  Sets the port where new requests will be handled. This can only be done prior to starting the managed bean. If the managed bean is already running then an exception is thrown.

  Parameters:
    `port` - The port to listen on.

### getPort

    public java.lang.Integer getPort()

  Returns the where a listener is waiting to process new request.

  Returns:
    The listening port.

### addEventHandler

    public void addEventHandler(java.lang.String name)
                         throws javax.management.MalformedObjectNameException,
                                javax.management.InstanceNotFoundException

  Adds a new event handler by its managed name.

  Parameters:
    `name` - The name of the handler to add.
  Throws:
    `javax.management.MalformedObjectNameException` - Thrown if the passed name is not a valid ObjectName.
    `javax.management.InstanceNotFoundException` - Thrown if no managed bean can be found that matches the name.

### removeEventHandler

    public void removeEventHandler(java.lang.String name)
                            throws javax.management.MalformedObjectNameException,
                                   javax.management.InstanceNotFoundException

  Removes an event handler. The passed name must be a valid JMX object name.

  Parameters:
    `name` - The name of the handler to remove.
  Throws:
    `javax.management.MalformedObjectNameException` - Thrown if the passed name is not a valid ObjectName.
    `javax.management.InstanceNotFoundException` - Thrown if no managed bean can be found that matches the name.

### setLogPrefix

    public void setLogPrefix(java.lang.String prefix)

  The logging prefix to use

### setEventsPerConnection

    public void setEventsPerConnection(java.lang.Integer number)

  The number of event records a new connection is allowed to send before the connection is terminated by the server. The connection is always terminated after an event receipt is generated, if one is required.

  Parameters:
    `number` - The number of event records.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.