Example 279

Adding a Port Forwarder Logger

A Port Forwarder logger must implement the PortForwarderLogger interface:

public void log(int logLevel, int logCode, Object[] params, Throwable throwable);

public void log(int logLevel, String msg, Throwable throwable);

The first function is used when the Port Forwarder logs a message in the Messages.properties file, i.e. messages of type PortForwar derConstants.LOG_LEVEL_INFO and PortForwarderConstants.L OG_LEVEL_ERROR and the second one is used for messages of type PortForwarderConstants.LOG_LEVEL_DEBUG and PortForwarderConstants.LOG_LEVEL_DEBUG_VERBOSE.

The PortForwarderLogger is added to the Port Forwarder by calling the setLogger function.

Example

Following is an example of the code for adding a Port Forwarder logger.

public class PortForwarderLoggerImpl implements PortForwarderLogger { private final ResourceBundle messages;

private PortForwarderGui portForwarderGui; /**

*Creates a new instance of PortForwarderLoggerImpl */

public PortForwarderLoggerImpl() {

messages = ResourceBundle.getBundle("Messages");

}

/**

*Tells the logger in which gui to log messages.

*

*@param portForwarderGui The gui to use

*/

public void setGui(PortForwarderGui portForwarderGui) { this.portForwarderGui = portForwarderGui;

}

private String createTimeStamp() {

SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss.SSS

");

String timeStamp = dateFormat.format(new Date()); return timeStamp;

}

private String createMessage(String msg) { return createTimeStamp() + " : " + msg;

}

Nortel VPN Gateway

User Guide

NN46120-104 02.01 Standard

14 April 2008

Copyright © 2007-2008 Nortel Networks

Page 279
Image 279
Nortel Networks NN46120-104 manual Adding a Port Forwarder Logger, Example

NN46120-104 specifications

Nortel Networks NN46120-104 is a versatile and efficient telecommunications hardware platform designed to meet the demands of modern networking environments. As a part of Nortel’s extensive portfolio, this device showcases the company’s commitment to innovation and reliability in the telecom sector.

One of the main features of the NN46120-104 is its robust performance capabilities. This platform is capable of handling high traffic volumes, making it suitable for medium to large enterprises. With its advanced routing capabilities and support for various protocols, the device ensures seamless communication across multiple network segments, providing efficient data transfer and connectivity.

The NN46120-104 is built upon the foundation of Nortel's renowned Layer 3 switching technology. This allows it to intelligently direct data packets based on their IP addresses, optimizing both speed and reliability. The inclusion of Virtual LAN (VLAN) support enhances network segmentation, improving security and management while reducing broadcast domains.

In terms of interface options, the NN46120-104 supports an array of Ethernet configurations, including Gigabit and Fast Ethernet ports. This flexibility allows organizations to tailor their networking solutions to their specific needs while enabling easy upgrades as technology evolves. The device also supports Power over Ethernet (PoE), facilitating the deployment of powered devices like IP phones and wireless access points without the need for additional power sources.

Another significant characteristic of the NN46120-104 is its robustness in terms of security features. With support for advanced security protocols and features such as Access Control Lists (ACLs), the device helps safeguard sensitive data by controlling traffic flow and restricting unauthorized access.

Additionally, the NN46120-104 is designed for ease of management. It offers an intuitive interface and supports various management protocols, including Simple Network Management Protocol (SNMP), enabling administrators to monitor and configure the device efficiently.

In summary, the Nortel Networks NN46120-104 combines high performance, extensive connectivity options, advanced security features, and ease of management, making it a formidable choice for enterprises looking to enhance their network infrastructure. Its capabilities align well with the rigorous demands of today’s digital communication landscape, ensuring reliability and efficiency in organizational operations.