com.outbackinc.services.protocol.snmp
Interface SnmpAuthoritativeSessionFactory


public interface SnmpAuthoritativeSessionFactory

Factory interface which creates SnmpAuthoritativeSessions and retrieves information from SnmpAuthoritativeSessions.

Usage: The following code snippet provides an example of its use:

      SnmpOrderInfo cSnmpOrderInfo = new SnmpOrderInfo(2, 3, 0);
      CSMSecurityInfo cCSMSecurityInfo = new CSMSecurityInfo(szReadCommunity, szWriteCommunity);
      SnmpAuthoritativeSessionFactory cSnmpAuthoritativeSessionFactory
          = SnmpLocalInterfaces.getAuthoritativeSessionFactory();
      SnmpAuthoritativeSession cRemoteSnmpAuthoritativeSession
          = cSnmpAuthoritativeSessionFactory.createRemoteAuthoritativeSession(szManagedHost,
                                                                              161,
                                                                              SnmpConstants.SNMP_VERSION_1,
                                                                              cCSMSecurityInfo);
      SnmpService cSnmpService = SnmpLocalInterfaces.getService();
      SnmpServiceConfiguration cSnmpServiceConfiguration
          = SnmpLocalInterfaces.getServiceConfiguration(cSnmpService);
      cSnmpServiceConfiguration.setBufferDelay(0);
      int iVal = cSnmpService.placeGetOrder(cRemoteSnmpAuthoritativeSession,
                                            cSnmpOrderInfo,
                                            szOIDs,
                                            this,
                                            iOrderNumStart);
 


Method Summary
 SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)
          Constructs a SNMPV3 local authoritative session with an agent through an SNMP entity with a known context.
 SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, int iSnmpVersion, SnmpSecurityInfo cSnmpSecurityInfo)
          Constructs a local authoritative session with an agent.
 SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, java.lang.String szContextEngineID, java.lang.String szContextName, SnmpSecurityInfo cSnmpSecurityInfo)
          Deprecated. as of jSNMP v3.1.1 by createLocalAuthoritativeSession(String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)
 SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)
          Constructs a remote authoritative session with an agent through an SNMP entity with a known context.
 SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, int iSnmpVersion, SnmpSecurityInfo cSnmpSecurityInfo)
          Constructs a remote authoritative session with an agent.
 SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress, int iAgentPort, java.lang.String szContextEngineID, java.lang.String szContextName, SnmpSecurityInfo cSnmpSecurityInfo)
          Deprecated. as of jSNMP v3.1.1 by createRemoteAuthoritativeSession(String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)
 java.net.InetAddress getAgentAddress(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the SNMP agent's address used in 'cSnmpAuthoritativeSession'.
 java.lang.String getAgentHostIPAddress(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the SNMP agent's IP address used in 'cSnmpAuthoritativeSession'.
 java.lang.String getAgentHostName(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the SNMP agent's host name used in 'cSnmpAuthoritativeSession'.
 int getAgentHostPort(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the SNMP agent's port used in 'cSnmpAuthoritativeSession'.
 java.lang.String getContextEngineID(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Deprecated. as of jSNMP v3.1.1 by getContextEngineIDBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
 byte[] getContextEngineIDBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the context engine ID used in 'cSnmpAuthoritativeSession'.
 java.lang.String getContextName(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Deprecated. as of jSNMP v3.1.1 by getContextNameBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
 byte[] getContextNameBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the context name used in 'cSnmpAuthoritativeSession'.
 SnmpSecurityInfo getSnmpSecurityInfo(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the security information used in 'cSnmpAuthoritativeSession'.
 SnmpSecurityToken getSnmpSecurityToken(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the security token for 'cSnmpAuthoritativeSession'; the class type of the returned object is SecurityModel dependent, and the session object needs to know nothing about it.
 int getSnmpVersion(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Get the SNMP version used in 'cSnmpAuthoritativeSession'.
 boolean isRemote(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
          Determine if 'SnmpAuthoritativeSession cSnmpAuthoritativeSession' is 'remote' or 'local'.
 

Method Detail

createRemoteAuthoritativeSession

public SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress,
                                                                 int iAgentPort,
                                                                 byte[] bContextEngineID,
                                                                 byte[] bContextName,
                                                                 SnmpSecurityInfo cSnmpSecurityInfo)
                                                          throws java.net.UnknownHostException,
                                                                 SnmpSecurityException
Constructs a remote authoritative session with an agent through an SNMP entity with a known context. For SNMPv3, if bContextEngineID is empty, then the authoritative host's context engine ID is used. This is the preferred method when using VMs with non-ASCII encodings.
Parameters:
szAgentAddress - address of the proxy service
iAgentPort - port of the proxy service
iSnmpVersion - SNMP version (SnmpConstants.SNMP_VERSION_1, SnmpConstants.SNMP_VERSION_2, or SnmpConstants.SNMP_VERSION_3 only)
bContextEngineID - engine ID of the entity that will process and respond to our requests, and/or send traps (SNMPv3).
bContextName - name of the context within the entity to handle messages (SNMPv3).
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
SnmpSecurityException - if fail to assign security token

createRemoteAuthoritativeSession

public SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress,
                                                                 int iAgentPort,
                                                                 java.lang.String szContextEngineID,
                                                                 java.lang.String szContextName,
                                                                 SnmpSecurityInfo cSnmpSecurityInfo)
                                                          throws java.net.UnknownHostException,
                                                                 SnmpSecurityException
Deprecated. as of jSNMP v3.1.1 by createRemoteAuthoritativeSession(String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)

Constructs a remote authoritative session with an agent through an SNMP entity with a known context. For SNMPv3, if szContextEngineID is "", then the authoritative host's context engine ID is used.
Parameters:
szAgentAddress - address of the proxy service
iAgentPort - port of the proxy service
iSnmpVersion - SNMP version (SnmpConstants.SNMP_VERSION_1, SnmpConstants.SNMP_VERSION_2, or SnmpConstants.SNMP_VERSION_3 only)
szContextEngineID - engine ID of the entity that will process and respond to our requests, and/or send traps (SNMPv3).
szContextName - name of the context within the entity to handle messages (SNMPv3).
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
SnmpSecurityException - if fail to assign security token

createRemoteAuthoritativeSession

public SnmpAuthoritativeSession createRemoteAuthoritativeSession(java.lang.String szAgentAddress,
                                                                 int iAgentPort,
                                                                 int iSnmpVersion,
                                                                 SnmpSecurityInfo cSnmpSecurityInfo)
                                                          throws java.net.UnknownHostException,
                                                                 SnmpSecurityException
Constructs a remote authoritative session with an agent. If iSnmpVersion is SnmpConstants.SNMP_VERSION_3, then the authoritative host's context engine ID is used and its context name is "".
Parameters:
szAgentAddress - address of the service
iAgentPort - port of the service
iSnmpVersion - SNMP version (SnmpConstants.SNMP_VERSION_1, SnmpConstants.SNMP_VERSION_2, or SnmpConstants.SNMP_VERSION_3 only)
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
SnmpSecurityException - if fail to assign security token

createLocalAuthoritativeSession

public SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress,
                                                                int iAgentPort,
                                                                byte[] bContextEngineID,
                                                                byte[] bContextName,
                                                                SnmpSecurityInfo cSnmpSecurityInfo)
                                                         throws java.net.UnknownHostException,
                                                                SnmpSecurityException
Constructs a SNMPV3 local authoritative session with an agent through an SNMP entity with a known context. If bContextEngineID is empty, then the authoritative host's context engine ID is used. This is the preferred method when using VMs with non-ASCII encodings.
Parameters:
szAgentAddress - address of the service
iAgentPort - port of the service
bContextEngineID - engine ID of the entity that will process and respond to our requests, and/or send traps (SNMPv3).
bContextName - name of the context within the entity to handle messages (SNMPv3).
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
SnmpSecurityException - if fail to assign security token

createLocalAuthoritativeSession

public SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress,
                                                                int iAgentPort,
                                                                java.lang.String szContextEngineID,
                                                                java.lang.String szContextName,
                                                                SnmpSecurityInfo cSnmpSecurityInfo)
                                                         throws java.net.UnknownHostException,
                                                                SnmpSecurityException
Deprecated. as of jSNMP v3.1.1 by createLocalAuthoritativeSession(String szAgentAddress, int iAgentPort, byte[] bContextEngineID, byte[] bContextName, SnmpSecurityInfo cSnmpSecurityInfo)

Constructs a SNMPV3 local authoritative session with an agent through an SNMP entity with a known context. If szContextEngineID is "", then the authoritative host's context engine ID is used.
Parameters:
szAgentAddress - address of the service
iAgentPort - port of the service
szContextEngineID - engine ID of the entity that will process and respond to our requests, and/or send traps (SNMPv3).
szContextName - name of the context within the entity to handle messages (SNMPv3).
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
SnmpSecurityException - if fail to assign security token

createLocalAuthoritativeSession

public SnmpAuthoritativeSession createLocalAuthoritativeSession(java.lang.String szAgentAddress,
                                                                int iAgentPort,
                                                                int iSnmpVersion,
                                                                SnmpSecurityInfo cSnmpSecurityInfo)
                                                         throws java.net.UnknownHostException,
                                                                SnmpSecurityException
Constructs a local authoritative session with an agent. If iSnmpVersion is SnmpConstants.SNMP_VERSION_3, then the authoritative host's context engine ID is used and its context name is "".
Parameters:
szAgentAddress - address of the service
iAgentPort - port of the service
iSnmpVersion - SNMP version (SnmpConstants.SNMP_VERSION_1, SnmpConstants.SNMP_VERSION_2, or SnmpConstants.SNMP_VERSION_3 only)
cSnmpSecurityInfo - security information
Throws:
java.net.UnknownHostException - if the szAgentAddress is not found through DNS
java.lang.IllegalArgumentException - if either invalid iAgentPort or iSnmpVersion
SnmpSecurityException - if fail to assign security token

getAgentHostIPAddress

public java.lang.String getAgentHostIPAddress(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the SNMP agent's IP address used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the SNMP agent's IP address.

getAgentHostName

public java.lang.String getAgentHostName(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the SNMP agent's host name used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the SNMP agent's host name.

getAgentAddress

public java.net.InetAddress getAgentAddress(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the SNMP agent's address used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the SNMP agent's address.

getAgentHostPort

public int getAgentHostPort(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the SNMP agent's port used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the SNMP agent's port.

getSnmpVersion

public int getSnmpVersion(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the SNMP version used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the SNMP version.

getSnmpSecurityInfo

public SnmpSecurityInfo getSnmpSecurityInfo(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the security information used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the security information.

getContextEngineIDBytes

public byte[] getContextEngineIDBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the context engine ID used in 'cSnmpAuthoritativeSession'. This is the preferred method when using VMs with non-ASCII encodings.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the context engine ID.

getContextNameBytes

public byte[] getContextNameBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the context name used in 'cSnmpAuthoritativeSession'. This is the preferred method when using VMs with non-ASCII encodings.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the context name.

getContextEngineID

public java.lang.String getContextEngineID(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Deprecated. as of jSNMP v3.1.1 by getContextEngineIDBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)

Get the context engine ID used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the context engine ID.

getContextName

public java.lang.String getContextName(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Deprecated. as of jSNMP v3.1.1 by getContextNameBytes(SnmpAuthoritativeSession cSnmpAuthoritativeSession)

Get the context name used in 'cSnmpAuthoritativeSession'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
the context name.

getSnmpSecurityToken

public SnmpSecurityToken getSnmpSecurityToken(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Get the security token for 'cSnmpAuthoritativeSession'; the class type of the returned object is SecurityModel dependent, and the session object needs to know nothing about it.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
security token.

isRemote

public boolean isRemote(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
Determine if 'SnmpAuthoritativeSession cSnmpAuthoritativeSession' is 'remote' or 'local'.
Parameters:
cSnmpAuthoritativeSession - local or remote authoritative session
Returns:
true if remote


Home  Services  Products  Purchase  Contact Us  About Us  Legal  Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.