Brocade Virtual ADX XML API Programmer’s Guide (Supporting ADX v03.1.00) User Manual

Page 847

Advertising
background image

Brocade Virtual ADX XML API Programmer’s Guide

837

53-1003248-01

Example - Provisioning real and virtual servers

B

//

/////////////////////////////////////////////////////////////////////////////

public class Utils

{

private Utils() { }

~Utils() { }

private static Utils m_Utils = null;

public SlbService m_SLBService = null;

public SysService m_SYSService = null;

private static StreamWriter m_StreamWriter = null;

private static FileStream m_FileStream = null;

/////////////////////////////////////////////////////////////////////////////

// Name: GetUtilsInstance

//

// Description: Returns the Utils class object. Creates the object if this

// object is not created previously.

//

// Parameters: -

//

/////////////////////////////////////////////////////////////////////////////

public static Utils GetUtilsInstance()

{

if (m_Utils == null)

m_Utils = new Utils();

return m_Utils;

}

/////////////////////////////////////////////////////////////////////////////

// Name: GetSLBObject

//

// Description: Returns the SlbService class object. Creates the new

object if

// this object is null.

//

// Parameters: -

//

/////////////////////////////////////////////////////////////////////////////

public SlbService GetSLBObject()

{

if (m_SLBService == null)

m_SLBService = new SlbService();

return m_SLBService;

}

/////////////////////////////////////////////////////////////////////////////

// Name: GetSYSObject

//

// Description: Returns the SysService class object. Creates the new

object if

// this object is null.

//

// Parameters: -

//

/////////////////////////////////////////////////////////////////////////////

public SysService GetSYSObject()

{

Advertising