Passing instance parametres through classes

I'd want to know if this way of programming is good
I have a class called Application which many classes should have access to. So what I do is to pass the instance of the class through the constructors of the classes that needs the Application class and all works fine.
Don't know if this is a good programming manneer.
Thanks!

Is there just one instance of the class? If so, google for "singleton pattern" and use that. It will do just what you want, will be recognized by other programmers, and is simpler.

Similar Messages

  • Passing an variable through classes on init

    i have a main class
    this class starts up another class
    so iv got 3 classes
    class1
    -load class2
    class2
    -load class3
    class3
    maxslots = 0
    now that maxslots variable i want to set up from the VERY first class1
    but i cant see how you pass it thought the classes so its loaded when each class is started up
    class class1{
         private static      class2 class2x= null;
      public static void main(String[] args) throws IOException {
              class2x= new class2(7);
    }ok so my class 2 now has 7
    public class class2 implements Runnable {
            int maxSlots = 0;
            static class3 class3x= new class3(maxSlots);
         public class2(int maxSlotsx) {
              maxSlots = maxSlotsx
    public class class3{
            int maxSlots = 0;
         public class3(int maxSlotsx) {
                    maxSlots = maxSlotsx
              System.out.println("maxSlots"+maxSlots);
    }now in class 2 i CANT place the set up class3 thing within class2 constructor because its runnable and only want it done ONCE
    any idea how to pass var 7 down to my end class3
    thanks :)

    ah i worked it out lol

  • Passing instance of the class to C++

    Hello,
    I pass instance of an object into C++ code, and I save pointer to it inside of DLL. So can I be sure that it wont be deleted later? Caz I need to use it in C++'s thread. It should be alive during all working, and java should not move it in memory...
    What do you think?
    Thanks,
    Dymytriy

    Won't work.
    Java won't delete it but it can move it.

  • Passing instance to other classes

    Hi,
    I have the following class
    public class myApp extends SingleFrameApplicationWhen I pass the instance like as given below, the instance of SingleFrameApplication is passed. How can I pass the instance of myApp along with this, so that I can access the variables of myApp class from other classes and packages.
    new TreeTableView(this);Please help.
    Any help in this regard will be well appreciated with points.
    Warm Regards,
    Rony

    Hi,
    i think the constructor of TreeTableView looks sth. like TreeTableView(SingleFrameApplication app), so the TreeTableView takes a SingleFrameApplication and not a myApp. you have two possibilities to access your methods and variables.
    1. Extend TreeTableView with a constructor TreeTableView(myApp app)
    or
    2. You cast the SingleFrameApplication to a myApp everytime you have to access myApp
    =>
    a = ((myApp)singleFrameApplicationInstance).variable;

  • Pass the name of a button into existing instance of a class from actionlist

    I want to pass a name of a button from actionlistener that is associated with that button into existing instance of a class. I need to do so because I have array of buttons and I have set the name of the buttons as coordinates. Is there a way to do that?

    My buttons are declared as JButton arrayOfButtons[][] = new JButton[numberOfRows][numberOfColumns];and I labeled them inside 2 for loops as:
    arrayOfButtons[row][column].setName(Integer.toString(row) + " " + Integer.toString(column));
    arrayOfButtons[row][column].setText("Some displayed text");I also added ActionListener
    arrayOfButtons[row][column].addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            System.out.println(((JButton)e.getSource()).getName());
    });Now when I press a button it only displays the array coordinates on a command line. I want the class instance where I declared the buttons to get notified which button was clicked.

  • Reg: Passing Image url through CSS Class

    Hi,
    How can i pass the image through Css class ?
    Thanks in advance.

    Hi,
    I am not sure if that can be done in css file though.
    I suppose you are using the backing bean for setting the skin (just read your old thread). If yes, you can add two images to your page and set the visible property according to the current skin. Something like
    <af:image id="i1" source="../images/first_logo.gif" visible="#{seesionScope.currentSkin == 'First'}"/>
    <af:image id="i2" source="../images/second_logo.gif" visible="#{seesionScope.currentSkin == 'Second'}"/>
    If i select Second CSS file then the logo will be change according to the style class defined in First CSS file .AFAIK, the company logo would be static ;) .
    -Arun

  • How to create the instance of a class and to use this object remotely

    I have to change a standalone program to do it working on a local net.
    the program is prepared for this adjustment, because the only problem for this change came from the use of the database; and, in the application, all the accesses to the database come from only a class that supplies a connection to the database.
    In this way I think that I could have (in a local net) a "server application" that has the database embedded inside it.
    Furthermore, some client applications (running in different computers of the net) could get access to the database through the connection that comes from an instance of the class that, in the "server application", is made to provide the connection to the database.
    I think this could be a good idea...
    But I don't have practice with distributed applications and I would ask some suggestion about the way to realize my modification.
    (in particular how to get and use, in the "client applications", the instance of the class that give the connection to the database from the "server application").
    I would have some help..
    thank in advance
    regards
    tonyMrsangelo.

    tonyMrsangelo wrote:
    I have to change a standalone program to do it working on a local net.
    the program is prepared for this adjustment, because the only problem for this change came from the use of the database; and, in the application, all the accesses to the database come from only a class that supplies a connection to the database.
    In this way I think that I could have (in a local net) a "server application" that has the database embedded inside it.
    Furthermore, some client applications (running in different computers of the net) could get access to the database through the connection that comes from an instance of the class that, in the "server application", is made to provide the connection to the database.
    I think this could be a good idea... Which is why JEE and implementations of that exist.
    But I don't have practice with distributed applications and I would ask some suggestion about the way to realize my modification.
    (in particular how to get and use, in the "client applications", the instance of the class that give the connection to the database from the "server application").
    You can't pass a connection from a server to a client. Nothing will do that.
    As suggested you can create a simple RMI server/client set up. Or use a more feature rich (and much more complex) JEE container.
    RMI is simple enough for its own tutorial
    [http://java.sun.com/docs/books/tutorial/rmi/index.html]
    JEE (previously called J2EE) is much more complex and requires books. You can get a brief overlook from the following
    [http://java.sun.com/javaee/]

  • Parametric inner classes have the same parametric tpye?

    The qestion I have is:
    If you have a parametric inner class with the name of the type parameter the same as the one of the parametric "outer" class. Are they the same?
    I think they should be, but I just made an obeservation that they probably aren't.
    The follwing code does not compile
    public class POC<E> {
        public Iterator<E> iterator() {
            return null;
        private class Magic<E> {
            private Iterator<E> iterator;
            public Magic() {
                Magic.this.iterator = POC.this.iterator();
    }What actually bugs me, is the error I got:
    incompatible types
    found: java.uti.Iterator<E>
    required: java.util.Iterator<E>
    hu? To me this looks like a match.
    I could get it to compile with an Instance of Iterator<E> passed to the constructor in stead of getting it by myself.
    And I use 1.5rc

    Probably because types E and T are not correlated:
    public class POC<E> {
        public Iterator<E> iterator() {
            return null;
        private class Magic<T> {
            private Iterator<T> iterator;
            public Magic() {
                Magic.this.iterator = POC.this.iterator();
    }The error message in this case is:
    POC.java: : incompatible types
    found   : java.util.Iterator<E>
    required: java.util.Iterator<T>
                Magic.this.iterator = POC.this.iterator();I've succeded to compile the following two programs:
    //1.
    public class POC<E> {
        public Iterator<E> iterator() {
            return null;
        private class Magic<E> {
            private Iterator<E> iterator;
            public Magic() {
                POC<E>  p = new POC<E>();
                iterator = p.iterator();
    // 2.
    public class POC<E> {
        public static <E> Iterator<E> iterator() {
            return null;
        private static class Magic<E> {
            private Iterator<E> iterator;
            public Magic() {
                iterator = POC.iterator();
    }Which one suits you best?
    Best regards,
    Andrej

  • Passing values to different classes.

    Class A (main panel) calls Class B (calendar panel) and Class C (textbox and buttons panel). When the users changes dates on the calendar class B, class C needs to be notified of the new values.
    I have two constructors in class C...an empty parameter constructor that is used when the main panel(A) calls it, and a constructor that accepts an Object as a parameter (which is the list of dates selected on the calendar), used when class B calls it.
    My problem is that when the values are changed on the calendar, class C is not holding on to the list of dates. In my constructor, I am enumerating through the list...so I know the values are being passed, but when I try to use the list later on in the code (when a button is clicked) the list is empty.
    Does anyone have any suggestions on how to resolve this problem?
    Thanks!!!!

    you can do something like that:
    public someClass {
    someOtherClass obj;
    public someclass (someOtherClass object) {
    this.obj = object;
    public void someMethod () {
    if (condition) { obj.someOtherMethod();  }
    public someOtherClass {
    //constructor here
    public void someOtherMethod () { //do Stuff }
    like this you could pass values between your classes A, B and C

  • Create an instance of my class variable

    Hello all,
    I'm a newbie to iPhone/iPad programming and am having some trouble, I believe the issue is that I'm not creating an instance of my class variable.  I've got a class that has a setter and a getter, I know about properties but am using setters and getters for the time being.  I've created this class in a View-based application, when I build the program in XCode 3.2.6 everything builds fine.  When I step through the code with the debugger there are no errors but the setters are not storing any values and thus the getters are always returning 0 (it's returning an int value).  I've produced some of the code involved and I was hoping someone could point out to me where my issue is, and if I'm correct about not instantiating my variable, where I should do that.  Thanks so much in advance.
    <p>
    Selection.h
    @interface Selection : NSObject {
      int _choice;
    //Getters
    -(int) Choice;
    //Setters
    -(void) setChoice:(int) input;
    Selection.m
    #import "Selection.h"
    @implementation Selection
    //Getters
    -(int)Choice {
      return _choice;
    //Setter
    -(void)setChoice:(int)input{
              _choice = input;
    RockPaperScissorsViewController.m
    #import "RockPaperScissorsViewController.h"
    @implementation RockPaperScissorsViewController
    @synthesize rockButton, paperButton, scissorsButton, label;
    //@synthesize humanChoice, computerChoice;
    -(void)SetLabel:(NSString *)selection{
              label.text = selection;
    -(IBAction)rockButtonSelected {
    //          [self SetLabel:@"Rock"];
              [humanChoice setChoice:1];
    </p>
    So in the above code it's the [humanChoice setChoice:1] that is not working.  When I step through that portion with the debugger I get no errors but when I call humanChoice.Choice later on in the code I get a zero.
    -NifflerX

    It worked, thank you so much.  I put
    humanChoice = [[Selection alloc]init];
    In viewDidLoad and it worked like a charm.  Thank you again.
    -NifflerX

  • Creating multiple instances of a class in LabVIEW object-oriented programming

    How do you create multiple instances of a class in a loop?  Or am I thinking about this all wrong?
    For instance, I read in a file containing this information:
    Person Name #1
    Person Age #1
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #2
    Person Age #2
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #3
    Person Age #3
    Hobby #1
    Hobby #2
    Hobby #3
    If I define a Person class with name, age, and an array of strings (for the hobbies), how can I create several new Person instances in a loop while reading through the text file?
    FYI, new to LabVIEW OOP but familiar with Java OOP.  Thank you!

    First of all, let's get your terminology correct.  You are not creating multiple instances of a class.  You are creating Objects of the class.
    Use autoindexing to create an array of your class type.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Indexing instances of specific class inside MovieClip authored with Flash Pro

    Hi there.
    I'm writing a class that extends MovieClip and that is linked to the MovieClip Object authored via Flash Pro during development (Father object).
    The hierarchy of this MovieClip Object is hidden from me - everything I know is that it may contain instances of other Class that was authored during development and extends MovieClip in the same manner (Son objects).
    I have no information regarding names or hierarchical positions of these Son objects inside Father object.
    Now the question is: how to get them listed?
    So approach I've taken was to implement current events:
    public class Son extends MovieClip
         public static const INITIALIZED : String = "son_initialized";
         public function Son ()
              this.dispatchEvent (new Event (INITIALIZED));
    public class Father extends MovieClip
         public var son : Vector<Son>;
         public function Father ()
              son = new Vector<Son> ();
              this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
         public function onSonInitialized (event : Event)
              this.son.push (event.target);
    Well, this code compiles with no errors whatsoever, but it turns out that onSonInitialized gets never called. I assume that's because children constructors are called ahead of their parent one.
    Is there any way to get them listed?
    Thanks in advance.

    kglad,
    I'm trying to get an array of references to Son objects (Son extends MovieClip), randomly located deep inside display list hierarchy of Father object (extends MovieClip too).
    The Father movieclip is authorized in Flash Professional and is a black box for me - I can only manipulate Father.as and Son.as.
    Since I can't know exactly their pathes and names (i.e. father.child1.child5OfChild1.son32 for example), I decided to make them self-aware, dispatching event during construction time, messaging everybody that this instance of Son exists:
    public function Son ()
         this.dispatchEvent (new Event (INITIALIZED));
    And then I attached a listener inside Father's constructor:
    public function Father ()
         this.addEventListener (Son.INITIALIZED, this.onSonInitialized);
    The idea was that this event listener should have been catching all the Sons, located inside Father. But it doesn't work that way - Father's constructor seems to be called after all constructors of its children, so this event listener catches nothing.
    I've worked this around by straightforward display list traversing - it works, but doesn't look so elegant. May be there is still a way to make it work through events?

  • Creating an instance of a class with no default constructor

    Hello gurus,
    I wrote my own serialization and RMI protocol for both C++ and Java that follows closely what the default Java version does. I'm trying to recreate an object on the Java side that was sent over the wire. The first step is to create an instance of the class. How do I create an instance of a class that has no constructor (i.e. the only instances are static, created by the class itself and returned by static methods) or one that has no default constructor (like Integer)? The Java serialization seems to support it but the reflection API doesn't seem to have any support for this (i.e. Class::newInstance() and Constructor::newInstance()). It seems that through the standard API you can only create an object via one of its constructors. There must be a "hidden" method somewhere that allows the Java serialization to create an object without calling a constructor - where is it?
    Dominique

    There must be a "hidden" method
    somewhere that allows the Java serialization to create
    an object without calling a constructor - where is
    it?You are correct, the way in which the Serialization creates Objects is "hidden" deep within the runtime.
    If it were not hidden, you would be able to find it, and use it to violate the integrity of the VM.

  • Creating an instance of a class at runtime?

    Does anyone know how to create an instance of a class at RunTime? For example, I want to load classes from a JAR file at RunTime, and then create instances of certain classes of each JAR. I ask this because I do not see how to create an instance of one of those classes the traditional way, SomeClass var = new SomeClass(). I am pretty sure that someone out there has done this and succeeded in doing it. All of the post on this stuff only talk about loading the class from a JAR file, but I have already loaded them using URLClassLoader�s findClass() method. I have also created an instance of the class that findClass() returns using newInstance(), but newInstance() returns an object of type Object. How can I convert this object to an object of type SomeClass? You cannot cast it because the compiler will complain due to the import statement issue. So if you cannot include the import statement because that classpath does not exist, then how the heck would you cast the newInstance() object into a SomeClass object?

    You can cast the returned object to the type you need...that is what I do in my applet. The trick is that you must get the instance of the applets class loader (or you get a classCastException). Pay attention to this line below - that's the real key here.
    "// Get a reference to the applets own classloader"
    protected CBaseQuestionnaireFile m_BaseObject = null;// declared up front
    m_BaseObject = loadAndRunClass("com.cpm.dataentry.questionnaire.CQuestionnaireFile");// fully qualified base object
    Here is the load and run method:
       CBaseQuestionnaireFile loadAndRunClass(String classname)
          com.cpm.common.base.CBaseQuestionnaireFile questBase = null;
          Class cClass = null;
          try
             // first we open the jar file with the classes we need
             String[] aJarList = new String[10];
             // Questionnaire format file
             File fURL1 = new File(GetMainFrame().m_strQuestionnaireFileName);
             URL url1   = new URL(fURL1.toURL(),"");
             URL urlNew = new URL("jar:" + url1.toExternalForm() + "!/" );
             // Server base class directory
             String strServerDirectory = "http://" + GetMainFrame().m_strHost + "/APPLETS/";
             File fURL2 = new File(strServerDirectory);
             URL url2 = new URL(fURL2.toURL(),"");
             URL urlNew2 = new URL("jar:" + url2.toExternalForm() + "!/" );
             // Local base class directory
             String strLocalDirectory = CSystem.GetBasePath() + "/Research/bin/";
             File fURL3 = new File(strLocalDirectory);
             URL url3 = new URL(fURL3.toURL(),"");
             URL urlNew3 = new URL("jar:" + url3.toExternalForm() + "!/" );
             File fURLBase = new File(CSystem.GetBasePath() + "/Research/bin/base.jar");
             URL urlBase = new URL(fURLBase.toURL(),"");
             URL urlNewBase = new URL("jar:" + urlBase.toExternalForm() + "!/" );
             File fURLControl = new File(CSystem.GetBasePath() + "/Research/bin/controls.jar");
             URL urlControl = new URL(fURLControl.toURL(),"");
             URL urlNewControl = new URL("jar:" + urlControl.toExternalForm() + "!/" );
             File fURLUtil = new File(CSystem.GetBasePath() + "/Research/bin/utlities.jar");
             URL urlUtil= new URL(fURLUtil.toURL(),"");
             URL urlNewUtil = new URL("jar:" + urlUtil.toExternalForm() + "!/" );
             // Determine where to look
             URL[] urlList = null;
             if(GetMainFrame().m_isStandalone == false) {
                // From a browser
                CSystem.PrintDebugMessage("Running as an applet");
                if(GetMainFrame().m_bOnLineMode == true) {
                   // On line
                   CSystem.PrintDebugMessage("*** On Line Mode ***");
                   urlList = new URL[2];
                   urlList[0] = urlNew;
                   urlList[1] = urlNew2;
                else {
                   // Off line
                   CSystem.PrintDebugMessage("*** Off Line Mode ***");
                   urlList = new URL[4];
                   urlList[0] = urlNew;
                   urlList[1] = urlNewBase;
                   urlList[2] = urlNewControl;
                   urlList[3] = urlNewUtil;
              else {
                 CSystem.PrintDebugMessage("*** Stand Alone Mode ***");
                 urlList = new URL[1];
                 urlList[0] = urlNew;
    CSystem.PrintDebugMessage("Question file/path: " + GetMainFrame().m_strQuestionnaireFileName);
            // Set the wait cursor
            GetMainFrame().SetWaitCursor();
            // Get a reference to the applets own classloader
            Class myClass = getClass();
            ClassLoader appletClassLoader = myClass.getClassLoader();
            // Call our multi-jar class loader
            JarClassLoader jarLoader = new JarClassLoader(urlList,appletClassLoader);
    CSystem.PrintDebugMessage("CPM Test - passed Jar Loader" + jarLoader.toString());
             // Load the classname from the jarfile
             try
                  cClass = jarLoader.loadClass(classname);
             catch(ClassNotFoundException cnfe)
                Object[] optionsConfirm = { "Ok" };
                JOptionPane.showOptionDialog(GetMainFrame(),"Questionnaire file is either damaged or has been tampered with.", "Questionnaire File Error",
                JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, optionsConfirm, optionsConfirm[0]);
                GetMainFrame().m_strQuestionnaireFileName = "";
                // Clear the wait cursor
                GetMainFrame().ClearWaitCursor();
                return null;
             Class cSuperclass = cClass.getSuperclass();
    CSystem.PrintDebugMessage("Test Superclass type is: " + cSuperclass.toString());
             Object o = cClass.newInstance();
    CSystem.PrintDebugMessage("Test plain class type is: " + o.toString());
             // Never remove this line of code
             // without it, a crafty user could use our load routine
             // to load/and run some nasty code
             // This test makes SURE that *ONLY* questionnaires get opened
             // and their methods get called
             if(o instanceof com.cpm.common.base.CBaseQuestionnaireFile)
                // Create the object
    CSystem.PrintDebugMessage("Test Is instance of CBaseQuestionnaireFile");
    CSystem.PrintDebugMessage("CPM Test - Casting to Base Class");
                questBase = (com.cpm.common.base.CBaseQuestionnaireFile)o;
    CSystem.PrintDebugMessage("CPM Test - Getting languages from questionnaire");
                GetMainFrame().GetLanguagesFromQuestionnaire(questBase);
    CSystem.PrintDebugMessage("CPM Test - Setting locale from Questionnaire selection");
                questBase.SetQuestionnaireLocale(GetMainFrame().m_locale);
    CSystem.PrintDebugMessage("CPM Test - Initializing Questionnaire");
                questBase.Initialize();
                questBase.InitializeCards();
              else
                Object[] optionsConfirm = { "Ok" };
                JOptionPane.showOptionDialog(GetMainFrame(),"Questionnaire file is either damaged or has been tampered with.", "Questionnaire File Error",
                JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, optionsConfirm, optionsConfirm[0]);
                GetMainFrame().m_strQuestionnaireFileName = "";
                // Clear the wait cursor
                GetMainFrame().ClearWaitCursor();
                return null;
          catch (Exception e)
              exDialog.showForThrowable(e.toString(),e);
         // Clear the wait cursor
         GetMainFrame().ClearWaitCursor();
         // Set MouseListener Pointer
    //     questBase.SetMouseListenerPointer(GetMainFrame().m_mouseListener);
         return questBase;
       }

  • Passing Public IPs through multiple ASA's (Part 2) - Continued

    This is the continuation of an issue posted on : https://supportforums.cisco.com/discussion/12463791/passing-public-ips-through-multiple-asas-part-1

    Here is a Show Run from the 5510 (heavily filtered)
    names
    name 10.40.0.0 MCST-FW-Net
    name 70.x.x.179 Masked_FW_Outside
    name 70.x.x.185 Dummy description Placeholder for 182
    name 10.40.128.25 EMAIL
    name 10.40.0.4 OpenVPN
    name 68.x.x.176 NEW_WAN
    name 10.39.0.2 CORE-ASA 
    name 70.x.x.224 PublicIPs
    dns-guard
    interface Ethernet0/0
     nameif outside
     security-level 0
     ip address 68.x.x.178 255.255.255.240
    interface Ethernet0/1
     nameif inside
     security-level 100
     ip address 10.40.0.1 255.255.255.0
    interface Ethernet0/2
     shutdown
     no nameif
     no security-level
     no ip address
    interface Ethernet0/3
     shutdown
     no nameif
     no security-level
     no ip address
    interface Management0/0
     shutdown
     no nameif
     no security-level
     no ip address
     management-only
    boot system disk0:/asa825-13-k8.bin
    ftp mode passive
    dns domain-lookup outside
    dns server-group DefaultDNS
     domain-name MASKED
    same-security-traffic permit inter-interface
    same-security-traffic permit intra-interface
    object-group service TCP-Services tcp
     port-object eq 10101
     port-object eq 123
     port-object range 15000 19999
     port-object eq 2000
     port-object eq 2195
     port-object eq 2196
     port-object eq 5038
     port-object eq 5061
     port-object eq 5228
     port-object eq 5229
     port-object eq 5230
     port-object eq 5432
     port-object eq h323
     port-object eq www
     port-object eq https
     port-object eq kerberos
     port-object eq ldap
     port-object eq ldaps
     port-object eq sip
     port-object eq smtp
     port-object eq ssh
     port-object eq citrix-ica
     port-object eq 943
     port-object eq pptp
     port-object eq imap4
    object-group service UDP-Services udp
     port-object eq 1718
     port-object eq 1719
     port-object eq 2727
     port-object eq 3478
     port-object eq 4500
     port-object eq 4520
     port-object eq 4569
     port-object eq 5000
     port-object range 50000 54999
     port-object range 60000 61799
     port-object eq 88
     port-object eq domain
     port-object eq sip
     port-object eq syslog
     port-object eq ntp
     port-object eq 1194
     port-object eq 8888
    object-group protocol VPN-Traffic
     protocol-object esp
     protocol-object ah
    object-group service TCP-Services-Inbound
     service-object esp
     service-object tcp eq 5228
     service-object tcp eq 5229
     service-object tcp eq 5230
     service-object tcp eq 5432
     service-object tcp eq ssh
    object-group service UDP-Services-Inbound udp
     port-object eq 4500
     port-object eq domain
     port-object eq isakmp
    object-group network test
     network-object 10.40.0.2 255.255.255.255
    object-group service DM_INLINE_UDP_2 udp
     port-object eq 4500
     port-object eq isakmp
    object-group icmp-type DM_INLINE_ICMP_1
     icmp-object echo
     icmp-object echo-reply
    object-group icmp-type DM_INLINE_ICMP_2
     icmp-object echo
     icmp-object echo-reply
    object-group service DM_INLINE_TCP_2 tcp
     group-object Samsung_TCP_Ports
     port-object eq www
     port-object eq https
    object-group network DM_INLINE_NETWORK_1
     network-object MCST-FW-Net 255.255.0.0
     network-object 70.x.x.160 255.255.255.224
    object-group service DM_INLINE_SERVICE_1
     service-object tcp eq 1701
     service-object udp eq 4500
     service-object udp eq isakmp
     service-object udp eq ntp
     service-object tcp eq www
    object-group service DM_INLINE_SERVICE_2
     service-object tcp eq https
     service-object udp eq 1194
     service-object udp eq 8080
    object-group service DM_INLINE_SERVICE_3
     service-object icmp
     service-object tcp eq https
    object-group protocol DM_INLINE_PROTOCOL_1
     protocol-object udp
     protocol-object tcp
    object-group protocol TCPUDP
     protocol-object udp
     protocol-object tcp
    object-group protocol DM_INLINE_PROTOCOL_2
     protocol-object udp
     protocol-object tcp
    object-group network publicips
    access-list inside_access_in extended permit ip PublicIPs 255.255.255.240 any
    access-list inside_access_in extended permit ip host 70.x.x.225 any
    access-list inside_access_in extended permit ip host 70.x.x.236 any
    access-list inside_access_in extended permit udp MCST-FW-Net 255.255.0.0 any object-group UDP-Services log
    access-list inside_access_in extended permit tcp MCST-FW-Net 255.255.0.0 any object-group TCP-Services log
    access-list inside_access_in extended permit esp MCST-FW-Net 255.255.0.0 any log
    access-list inside_access_in extended permit udp MCST-FW-Net 255.255.0.0 any object-group DM_INLINE_UDP_2 log
    access-list inside_access_in extended permit tcp MCST-FW-Net 255.255.0.0 any object-group DM_INLINE_TCP_2 log
    access-list inside_access_in extended permit icmp MCST-FW-Net 255.255.0.0 any log
    access-list inside_access_in extended permit tcp 10.10.10.0 255.255.255.0 any eq 873 inactive
    access-list inside_access_in extended permit object-group DM_INLINE_SERVICE_2 host OpenVPN any
    access-list inside_access_in extended permit udp host 70.x.x.182 any eq 1194
    access-list inside_access_in extended permit tcp host 70.x.x.182 any eq ssh
    access-list inside_access_in extended permit ip host 70.x.x.231 any log
    access-list inside_access_in extended permit ip host 70.x.x.232 any
    access-list inside_access_in extended permit ip host 70.x.x.233 any log
    access-list inside_access_in extended permit ip NEW_WAN 255.255.255.248 interface inside inactive
    access-list inside_access_in extended deny ip any any log
    access-list inside extended permit tcp 70.x.x.240 255.255.255.240 72.x.x.64 255.255.255.224 object-group TCP-Services
    access-list inside extended permit udp 70.x.x.240 255.255.255.240 72.x.x.64 255.255.255.224 object-group UDP-Services
    access-list outside extended permit udp 72.x.x.64 255.255.255.224 70.x.x.240 255.255.255.240 object-group UDP-Services
    access-list outside extended permit tcp 72.x.x.64 255.255.255.224 70.x.x.240 255.255.255.240 object-group TCP-Services
    access-list outside_access_in remark STEALTH RULE
    access-list outside_access_in extended deny ip any host Masked_FW_Outside log
    access-list outside_access_in extended permit ip any PublicIPs 255.255.255.240
    access-list outside_access_in extended permit ip any host 70.x.x.225
    access-list outside_access_in extended permit ip any host 70.x.x.231 log
    access-list outside_access_in extended permit ip any host 70.x.x.232
    access-list outside_access_in extended permit ip any host 70.x.x.233 log
    access-list outside_access_in extended permit ip any host 70.x.x.236 log
    access-list outside_access_in extended permit esp any 70.x.x.160 255.255.255.224 log
    access-list outside_access_in extended permit object-group DM_INLINE_SERVICE_1 any 70.x.x.160 255.255.255.224 log
    access-list outside_access_in extended permit object-group DM_INLINE_SERVICE_3 any 70.x.x.160 255.255.255.224
    access-list outside_access_in extended permit udp any host 70.x.x.182 eq 1194
    access-list outside_access_in extended permit tcp any host 70.x.x.182 eq ssh
    access-list outside_access_in remark Ping
    access-list outside_access_in extended permit icmp any host 10.40.0.33 inactive
    access-list outside_access_in extended permit tcp any 70.x.x.160 255.255.255.224 object-group TCP-Services inactive
    access-list outside_access_in extended permit udp any 70.x.x.160 255.255.255.224 object-group UDP-Services inactive
    access-list outside_access_in extended permit ip PublicIPs 255.255.255.240 NEW_WAN 255.255.255.248 inactive
    access-list outside_access_in extended deny ip any any log
    access-list Mobility_Infrastructure_access_in remark Ping Test
    access-list inside_access_out extended permit ip any any log
    access-list inside_access_out extended permit esp any object-group DM_INLINE_NETWORK_1 log
    access-list inside_access_out extended permit icmp any any
    access-list Inside2_access_in extended permit ip 10.39.0.0 255.255.255.0 any
    access-list Inside2_access_in extended permit ip any 10.39.0.0 255.255.255.0
    pager lines 24
    logging enable
    logging timestamp
    logging console debugging
    logging monitor informational
    logging buffered debugging
    logging trap informational
    logging history critical
    logging asdm warnings
    logging device-id hostname
    mtu outside 1500
    mtu inside 1500
    ip verify reverse-path interface outside
    ip verify reverse-path interface inside
    icmp unreachable rate-limit 1 burst-size 1
    asdm image disk0:/asdm-647.bin
    no asdm history enable
    arp timeout 14400
    global (outside) 1 interface
    nat (inside) 1 0.0.0.0 0.0.0.0
    static (inside,outside) 70.x.x.182 10.40.0.7 netmask 255.255.255.255
    static (inside,outside) 70.x.x.180 10.40.0.2 netmask 255.255.255.255
    static (inside,outside) 70.x.x.181 10.40.0.17 netmask 255.255.255.255
    static (outside,inside) 10.40.0.7 70.x.x.182 netmask 255.255.255.255
    static (outside,inside) 10.40.0.2 70.x.x.180 netmask 255.255.255.255
    static (outside,inside) 10.40.0.17 70.x.x.181 netmask 255.255.255.255
    static (inside,outside) PublicIPs PublicIPs netmask 255.255.255.240
    access-group outside_access_in in interface outside
    access-group inside_access_in in interface inside
    access-group inside_access_out out interface inside
    route outside 0.0.0.0 0.0.0.0 68.101.41.177 1
    route inside 10.40.64.0 255.255.192.0 10.40.0.17 1
    route inside 10.40.128.0 255.255.192.0 10.40.0.17 1
    route inside 10.50.0.0 255.255.255.0 10.40.0.21 1
    route inside 10.50.0.11 255.255.255.255 10.40.0.21 1
    route inside 10.50.112.0 255.255.255.0 10.40.0.21 1
    route inside 10.60.0.233 255.255.255.255 10.40.0.21 1
    route inside PublicIPs 255.255.255.224 10.40.0.21 1
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    aaa authentication enable console LOCAL
    aaa authentication ssh console LOCAL
    http server enable
    http server session-timeout 10
    http 0.0.0.0 0.0.0.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    no sysopt connection permit-vpn
    sysopt noproxyarp inside
    crypto ipsec security-association lifetime seconds 28800
    crypto ipsec security-association lifetime kilobytes 4608000
    telnet timeout 5
    ssh 0.0.0.0 0.0.0.0 inside
    ssh timeout 5
    console timeout 30
    threat-detection basic-threat
    threat-detection statistics
    threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
    webvpn
     service-type nas-prompt
    class-map inspection_default
     match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
     parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
     class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny
      inspect sunrpc
      inspect xdmcp
      inspect sip
      inspect netbios
      inspect tftp
      inspect ip-options
      inspect icmp
    service-policy global_policy global
    privilege cmd level 3 mode exec command perfmon
    privilege cmd level 3 mode exec command ping
    privilege cmd level 3 mode exec command who
    privilege cmd level 3 mode exec command logging
    privilege cmd level 3 mode exec command failover
    privilege cmd level 3 mode exec command vpn-sessiondb
    privilege cmd level 3 mode exec command packet-tracer
    privilege show level 5 mode exec command import
    privilege show level 5 mode exec command running-config
    privilege show level 3 mode exec command reload
    privilege show level 3 mode exec command mode
    privilege show level 3 mode exec command firewall
    privilege show level 3 mode exec command asp
    privilege show level 3 mode exec command cpu
    privilege show level 3 mode exec command interface
    privilege show level 3 mode exec command clock
    privilege show level 3 mode exec command dns-hosts
    privilege show level 3 mode exec command access-list
    privilege show level 3 mode exec command logging
    privilege show level 3 mode exec command vlan
    privilege show level 3 mode exec command ip
    privilege show level 3 mode exec command ipv6
    privilege show level 3 mode exec command failover
    privilege show level 3 mode exec command asdm
    privilege show level 3 mode exec command arp
    privilege show level 3 mode exec command route
    privilege show level 3 mode exec command ospf
    privilege show level 3 mode exec command aaa-server
    privilege show level 3 mode exec command aaa
    privilege show level 3 mode exec command eigrp
    privilege show level 3 mode exec command crypto
    privilege show level 3 mode exec command vpn-sessiondb
    privilege show level 3 mode exec command ssh
    privilege show level 3 mode exec command dhcpd
    privilege show level 3 mode exec command vpn
    privilege show level 3 mode exec command blocks
    privilege show level 3 mode exec command wccp
    privilege show level 3 mode exec command dynamic-filter
    privilege show level 3 mode exec command webvpn
    privilege show level 3 mode exec command module
    privilege show level 3 mode exec command uauth
    privilege show level 3 mode exec command compression
    privilege show level 3 mode configure command interface
    privilege show level 3 mode configure command clock
    privilege show level 3 mode configure command access-list
    privilege show level 3 mode configure command logging
    privilege show level 3 mode configure command ip
    privilege show level 3 mode configure command failover
    privilege show level 5 mode configure command asdm
    privilege show level 3 mode configure command arp
    privilege show level 3 mode configure command route
    privilege show level 3 mode configure command aaa-server
    privilege show level 3 mode configure command aaa
    privilege show level 3 mode configure command crypto
    privilege show level 3 mode configure command ssh
    privilege show level 3 mode configure command dhcpd
    privilege show level 5 mode configure command privilege
    privilege clear level 3 mode exec command dns-hosts
    privilege clear level 3 mode exec command logging
    privilege clear level 3 mode exec command arp
    privilege clear level 3 mode exec command aaa-server
    privilege clear level 3 mode exec command crypto
    privilege clear level 3 mode exec command dynamic-filter
    privilege cmd level 3 mode configure command failover
    privilege clear level 3 mode configure command logging
    privilege clear level 3 mode configure command arp
    privilege clear level 3 mode configure command crypto
    privilege clear level 3 mode configure command aaa-server
    prompt hostname context
    no call-home reporting anonymous
    call-home
     profile CiscoTAC-1
      no active
      destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
      destination address email [email protected]
      destination transport-method http
      subscribe-to-alert-group diagnostic
      subscribe-to-alert-group environment
      subscribe-to-alert-group inventory periodic monthly
      subscribe-to-alert-group configuration periodic monthly
      subscribe-to-alert-group telemetry periodic daily
    Cryptochecksum:bd962a8c0dd6b27b5b024778602f8b60
    : end

Maybe you are looking for