Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
sasapplication.java
Package: AdventNetSNMPAPI_4.zip [view]
Upload User: aonuowh
Upload Date: 2021-05-23
Package Size: 35390k
Code Size: 2k
Category:
SNMP
Development Platform:
C/C++
- /* $Id: sasapplication.java,v 1.4 2002/09/09 05:39:09 parasuraman Exp $ */
- /*
- * @(#)sasapplication.java
- * Copyright (c) 1996-2002 AdventNet, Inc. All Rights Reserved.
- * Please read the associated COPYRIGHTS file for more details.
- */
- /**
- * This example shows how applications can use the sasappclient file by
- * plugging in their own Applet stub.
- *
- * It basically instantiates the sasappclient object, sets the user-defined
- * AppletStub stub into it.
- */
- import com.adventnet.management.transport.*;
- import com.adventnet.snmp.snmp2.*;
- import javax.swing.*;
- import java.awt.event.*;
- import java.net.*;
- public class sasapplication extends JFrame {
- sasapplication() {
- super("SAS Application");
- }
- public static void main (String[] args) {
- sasapplication testObj = new sasapplication();
- final sasappclient obj = new sasappclient();
- // Create the Applet stub & plug it into the Applet
- SASAppletStub sasStub = new SASAppletStub();
- sasStub.setParameter("TRANSPORT_PROVIDER","com.adventnet.management.transport.TcpClientTransportImpl");
- // localhost can be replaced by any host name
- sasStub.setParameter("HOST","localhost");
- // set the port parameter to the port in which SAServer is listening.
- sasStub.setParameter("PORT","8282");
- sasStub.setParameter("CODEBASE", "http://localhost:8282/");
- sasStub.setParameter("DOCUMENTBASE", "http://localhost:8282/");
- try {
- URL codebase = new URL("http://localhost:8282/");
- sasStub.setCodeBase(codebase);
- sasStub.setDocumentBase(codebase);
- } catch (Exception e) {};
- obj.setStub(sasStub);
- // Start the Applet
- obj.init();
- obj.start();
- // Set UI properties of the frame
- testObj.getContentPane().add (obj);
- testObj.pack();
- testObj.setVisible(true);
- // Set the window listener behaviour
- WindowAdapter win = new WindowAdapter() {
- public void windowClosing(WindowEvent e) {
- obj.stop();
- System.exit(0);
- }
- };
- testObj.addWindowListener(win);
- }
- }