How to Differntiate between two instances of the same class ????

I don't even know if my question makes sense or not ??
I don't have any code written for it yet.. but its the most critical task for me..
Q ??
say i have multiple objects running of the same class on the same box.
sth like a CPU can have multiple ports. The port class is intantiated
to create every new port for CPU as required.
Now i have to differntiate multiple ports on that box and give
accordingly its statistics back to CPU. sth like how many acces to
ports, how much bandwidth available, how many bits.. i know how to
calculate statistics of ports but i don't know how to differentiate
between multiple ports ??
Eg: Number of sessions created on oneport is 14 and other is 25. Then i
have to give differnt statistics of these 2 ports back to CPU.
I hope all this made some sense ???
Thank youuuuu....reply back if u need some more details....
Edited by: javanewbie83 on Jun 16, 2008 4:28 PM

javanewbie83 wrote:
I don't even know if my question makes sense or not ??
I don't have any code written for it yet.. but its the most critical task for me..
Q ??
say i have multiple objects running of the same class on the same box.
For an example: (its just a correlation to my project.. its actually not CPU and port numbers.. sorry if u misunderstand...)
sth like a CPU can have multiple ports. The port class is intantiated
to create every new port for CPU as required.
Now i have to differntiate multiple ports on that box and give
accordingly its statistics back to CPU. sth like how many acces to
ports, how much bandwidth available, how many bits.. i know how to
calculate statistics of ports but i don't know how to differentiate
between multiple ports ??
Eg: Number of sessions created on oneport is 14 and other is 25. Then i
have to give differnt statistics of these 2 ports back to CPU.
I hope all this made some sense ???
Thank youuuuu....reply back if u need some more details....Simply repeating your unclear original post does not magically make it clear.

Similar Messages

  • Distinguishing between two instances of the same portlet

    Hi Experts,
    Is there a way to distinguish between two instance of the same portlet in different browser windows?
    I'm looking for something like URL parameter passing, but just for portlets.
    The problem is, I want a way to pass a parameter between views in a portlet, but in such a way that if another browser window is opened and navigated to that portlet page, the parameter won't be the same. Perhaps I can explain better with this example:
    Page A has a portlet on it which has a textbox and 2 buttons - the first button stores the value in the textbox in the PortletRequest (or PortletURL) and if you click the second button the portlet navigates to a different view which displays the value. If I navigate with a second browser window to Page A, however, and only click the navigate button, that value which was stored by the first instance of the portlet will still be shown. I want them to be independent, I don't want changes in the one's PortletRequest to reflect in the other one's PortletRequest.
    Any ideas?
    Thanks,
    JP

    Why not use two instances of the same portlet, i.e. create two channels of the same portlet.
    The behave the same, have the same application logic, so all you need is to transfer informations between the two portlets.If you want this within user space use the portlet session, otherwise access the http session context /application context and store the data there.
    The behavior would be controlled by the portlet preferences, so channel a (instance 1) would be configured to run as controller and channel b (instance 2) would be configured as receiver.

  • How can I stop two instances of the same application?

    I have just installed Yosemite about a week ago on my MacBook Pro mid '10 and it's working great except for one little glitch.
    Whenever I double-click on a file in my Finder, not only does it open in the assigned dock Application, but a second instance of the same Application pops up on the dock out of nowhere. To be more clear, I have my PDFs set to Preview. I click on a PDF in my Finder and Preview starts jumping. Out of nowhere, another copy of Preview springs up on the dock and starts jumping as well. This opens that same PDF twice on my screen.
    I noticed this also happens when I'm installing a .dmg file. Two installers open at the same time when I double-click the icon.
    It doesn't happen if I right-click > Open or right-click > Open With.
    Any thoughts?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • How do I install two instances on the same Server and avoid a conflict?

    Hi,
    I have one Server and I want to install two instances of SQL Server on it.
    1. Will be a default instance.
    2. Will be a named instance.
    The Server has an IP address of 192.168.0.10 and the default instance will be using port 1433.
    I want them to share the same address, but be listening on different ports.
    Do I,
    1. Go into TCP/IP of the named instance and set the port numbers for all the IP's to a port number, e.g. 1976?
    2. Delete the 0 from the dynamic ports sections?
    3. Create an open port rule in the Windows Firewall to allow access to the Server?   
    Thanks

    Hi,
    Please see following Microsoft link
    Configure SQL Server to listen on Specific port
    Configure Windows firewall to allow SQL Server access
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Two threads in the same class ? Is that possible ?

    Hello, I am trying to use threads to move two images around the frame. And I am wondering if it is possible if it is possible to create two separate threads that act differently in the same class, for each of the image.
    Is just that so far I can't see a way since, by implementing Runnable, I'll need to overwrite the run() method. Which in a way just allows me to manage one image.
    Of course I can do two separate classes (each implementing Runnable) for each of the image, but since I think it may be an overkill, I rather to do it in just one.
    So, is that possible ?
    Thank you in advance.

    Of course I can do two separate classes (each implementing Runnable) for each of the image,Use two instances of the same class. Something like this example:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=631379

  • How do I share one itunes account between two users on the same computer

    How do I share one itunes account between two users on the same computer without taking up twice as much space on my hard drive?

    You would need to move the itunes folder to a location that both users have permissions to access such as the Shared folder or any folder on the root level of the macintosh HD.
    You can find instructions here http://support.apple.com/kb/HT1203 This method allows you to share the content without sharing the same library.

  • Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • How do I share music between two accounts on the same i-mac

    How do I share music between two accounts on the same i-mac

    iTunes: How to share music between different accounts on a single computer - http://support.apple.com/kb/HT1203 - relocating iTunes' media folder to a shared area but leaving separate library files - extra tip at https://discussions.apple.com/message/17331189

  • Can i share music and photos between two users on the same machine?

    How can I share my music and photos between two users on the same machine?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • TS2972 is it possible to use home sharing between two users on the same computer?

    My wife and I have itunes accounts and want to be able to share music we have each bought on our accounts. We have tried setting up the home sharing on our PC but it doesn't show up on the screen. Can anyone please help?

    "Is it possible to use home sharing between two users on the same computer?"
    No. Home sharing is used to connect two running instances of iTunes across a network. When you switch users on the computer all applications running on the other profile are suspended.
    You can however share your respective media folders so that they are visible in either profile and then copy over any content that you want, or you could create a single joint library which you use when either user is logged in.
    tt2

  • Two instances on the same server

    I've already created one instance on 11g R2 database, but I was told to create another instance on the same server. Can I use the same listener for both instance? Will it cause any problem?
    Thanks!
    - Johnny

    tanww888 wrote:
    Thanks for all your responses. I have not dealt with two instances on the same server before. I'll take your advice to start with the same listener for both instances and see if it is causing any issue. My database server is a Oracle Sparc 5120 with plenty of memory and disk space. The second instance that I'm going to create will be much smaller than the first one.
    Single or multiple listeners aren't really a factor for performance. Notice that even in Dan's remarks, none of his reasons for multiple listeners had anything to do with performance.
    Question, is it easy to create/configure the second listener to point to the second instance? Just in case there is an issue using the same instance.
    The listener doesn't "point to" the database - not in the sense you seem to think. It simply watches the ports it is configured to use (1521 by default) for connection requests from clients. When it gets a request it evaluates whether or not it knows about the service (instance) requested, and if it does it spawns a separate server processes to communicate between the client and the db instance, then is out of the way. The listener creates the connection but does not sustain it. You can stop a listener and all existing connection will continue because the listener has no part in maintaining them.
    Multiple listeners would be configured by adding LISTENER sections to the listener.ora file. You might find it instructive to realize that if there is no listener.ora, a 'lsnrctl start' will cause a default named listener to start on the default port of 1521. By default, any db instances on that server will register themselves with the default listener on the default port. After this self-registration, the listener will know about the instance if/when it receives any connection requests for it. Let's switch from the telephone analogy to that of a desk clerk at a hotel. He comes to work and is handed a piece of paper that says "We have Tom, Dick, and Harry registered as guests" This would be analogous to the listener learning of instances via the SID_LIST section of the listener.ora file. Then Fred walks up and says "I'm Fred and I'm in room 238", so the clerk makes a note of that. This would be analogous to the instance registering itself to the listener. Either way, then someone walks up and says "Where would I find Tom (or Fred)". The clerks checks his lists and directs the person to the correct room. He doesn't escort the person around to Tom and act as a go-between for their conversation. And hotel management doesn't want to have to pay a separate clerk for each guest.
    You might want to read my articles about TNS in general at edstevensdba.wordpress.com. I think they will help you get a clearer understanding.
    Thanks,
    - Johnny

  • How can I open multiple instances of the same version of FF?

    I understand that if I have multiple profiles, I can run different versions of FF side-by-side (like 3.6 and 4).
    However, what I'm interested in is how I can launch multiple instances of the same version of FF (4, for instance) using the same profile. In other words, I want to be able to double-click the desktop icon for FF, and open a new instance, and keep doing that as many times as I want. I don't want to have a different icon and profile for each instance (too much overhead to keep a dozen+ profiles in sync).
    I can always launch one FF window instance, and then keep clicking ctrl+N to launch new instances from inside it, which they all share the same profile (as I want). So, basically, I want to be able to do that from my desktop icon, rather than by having to do it with the keyboard ctrl+N sequence.

    But I don't understand why whatever Firefox does when you click ctrl+N can't also be done (with some sort of command-line switch) from a desktop icon?
    In other words, I clearly can create many FF instances (even if they are the same FF.exe process) by doing ctrl+n a bunch of times. Why then can't this behavior be done from a desktop icon with some parameters?
    As far as I know, FF is the only browser that doesn't directly allow multiple browser instances from desktop icons. IE, Chrome, Safari, Opera, etc... all let me launch a new instance (even if they are all single process and the instances are shared within the process).

  • Share a library between two users on the same mac?

    It is possible to share a library between two users on the same mac?

    It's doable. As it's been pointed out Aperture has no provisions for file locking so you can't have two users accessing the library at the same time. This includes having one user having the library open only for browsing. Aperture doesn't have a +Read Only+ mode, when it opens the library, even if you make no changes to any images, the library will be written to.
    This also means you can't have one user open the library and then stop using Aperture but still have the library open and then have another copy of Aperture open on the library.
    Of course if you have two copies of Aperture running even they are on different libraries you'll be in violation of the license and you'll have bigger problems to worry about then a toasted library.

  • How can I make two copies of the same picture one with my watermark and one without for printing for clients?

    how can I make two copies of the same picture one with my watermark and one without for printing for clients?

    Export the photo twice, once with a watermark and once without a watermark.

  • Sync a folder between two users on the same computer.

    I would like to sync a folder between two users on the same computer so that they are always the same when I access them from either user.

    then place this folder somewhere where both users have access to like in /Users/Shared. then there is only one folder to deal with and you don't need to sync anything.

Maybe you are looking for