Accessing a Thread by name?

Hello everyone, I have a question about thread programming. I have several threads running and the are all named. I'm wondering if there is a way from my main code to access a specific thread by name? for example, my main program wants to call a method in "ThreadB"?
I'm programming a chat type application and I need to be able to add a client to a host thread ...... here's an example
packetType = recvData.getInt();
if(packetType == JOIN_HOST)
     // This is the name of the thread the client wants to
     // connect to.
      String hostName = recvData.getString();
     // Here is where I need to access a specific thread based on the host
// the client wants to connect to.   Any Ideas?
}I know this question seems brief but if anyone can help I would be very thankful....
Thanks,
Mike

david: not sure if I am, let me explain a little more. I am writing a chat program and I have a couple different classes. I have a separate host program that a host user logs in with. The server will spawn a new thread for each host that is logged in. These host threads are what i am talking about. A client will log in and be shown a window with a list of the online host users. I have the client selecting a host user and sending the request to the server...... here is where my problem is. I need to, based on the name the client send, connect the client with the desired host. So, If I make a method in the host class is it accessable outside the thread?
If not, how can I add a client object to a running host thread?
Sorry if I'm not explaining this correctly.
Mike

Similar Messages

  • When I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    when I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    Hello Oddsbodkin,
    It looks like the creator of Netflix Desktop has a site for the project here:
    https://answers.launchpad.net/netflix-desktop/
    I would try posting your question there and see if anyone else has encountered this error and has a solution.
    Cheers, Patrick

  • 550 Access denied - Invalid HELO name

    Can someone tell me if this error message is my problem or the recipients? 99% of our email goes through fine, but we now have 3 customers we get this error from. The email was sent from Snow Leopard Server 10.6.5. I did an MX check and MXToolbox reported back my ISP's IP address and not the static IP address of our server.
    Return-Path: <MAILER-DAEMON>
    Delivered-To: [email protected]
    Received: by mail (Postfix)
    id CBBB646C13E; Thu, 30 Dec 2010 11:26:53 -0600 (CST)
    Date: Thu, 30 Dec 2010 11:26:53 -0600 (CST)
    From: [email protected] (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: [email protected]
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
    boundary="4B5E246C13C.1293730013/mail"
    Content-Transfer-Encoding: 7bit
    Message-Id: <20101230172653.CBBB646C13E@mail>
    This is a MIME-encapsulated message.
    --4B5E246C13C.1293730013/mail
    Content-Description: Notification
    Content-Type: text/plain; charset=us-ascii
    This is the mail system at host mail.
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    For further assistance, please send mail to postmaster.
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    The mail system
    <[email protected]>: host THEIRSERVER.com[66.117.3.196] said: 550 Access denied -
    Invalid HELO name (See RFC2821 4.1.1.1) (in reply to MAIL FROM command)
    --4B5E246C13C.1293730013/mail
    Content-Description: Delivery report
    Content-Type: message/delivery-status
    Reporting-MTA: dns; mail
    X-Postfix-Queue-ID: 4B5E246C13C
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; THEIRSERVER.com
    Diagnostic-Code: smtp; 550 Access denied - Invalid HELO name (See RFC2821
    4.1.1.1)
    --4B5E246C13C.1293730013/mail
    Content-Description: Undelivered Message
    Content-Type: message/rfc822
    Content-Transfer-Encoding: 7bit
    Received: from localhost (localhost [127.0.0.1])
    by mail (Postfix) with ESMTP id 4B5E246C13C
    for <[email protected]>; Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    X-Virus-Scanned: amavisd-new at MYSERVER.com
    Received: from mail ([127.0.0.1])
    by localhost (MYSERVER.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id XlYy8X32jZDY for <[email protected]>;
    Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    Received: from [192.168.88.11] (mail.MYSERVER.com [96.226.0.23])
    by mail (Postfix) with ESMTPSA id 3512046C135
    for <[email protected]>; Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    From: Brian Jagielski <[email protected]>
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit
    Subject: Test
    Date: Thu, 30 Dec 2010 11:26:51 -0600
    Message-Id: <[email protected]>
    To: [email protected]
    Mime-Version: 1.0 (Apple Message framework v1082)
    X-Mailer: Apple Mail (2.1082)
    --4B5E246C13C.1293730013/mail--

    Sorry. Was trying to be safe, but if it doesn't matter here it is
    biff = no
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    header_checks = pcre:/etc/postfix/customheaderchecks
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    mail_owner = _postfix
    mailboxsizelimit = 0
    mailbox_transport = dovecot
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    messagesizelimit = 20971520
    mydestination = $myhostname, localhost.$mydomain, mail.youngamericagroup.com, youngamericagroup.com, $mydomain
    mydomain = youngamericagroup.com
    mydomain_fallback = localhost
    myhostname = mail
    mynetworks = 127.0.0.0/8
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relayhost =
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = _postdrop
    smtpdclientrestrictions = permit_mynetworks permitsaslauthenticated permit
    smtpdenforcetls = no
    smtpdhelorequired = yes
    smtpdhelorestrictions = permitsaslauthenticated permit_mynetworks rejectinvalid_helohostname rejectnon_fqdn_helohostname
    smtpdpw_server_securityoptions = cram-md5,gssapi,login,plain
    smtpdrecipientrestrictions = permitsaslauthenticated permit_mynetworks rejectunauthdestination permit
    smtpdsasl_authenable = yes
    smtpdtlsCAfile = /etc/certificates/youngamericagroup.com.EAC01934DECC18B36C5A42CBFED35A0C2C93C0E 5.chain.pem
    smtpdtls_certfile = /etc/certificates/youngamericagroup.com.EAC01934DECC18B36C5A42CBFED35A0C2C93C0E 5.cert.pem
    smtpdtls_excludeciphers = SSLv2, aNULL, ADH, eNULL
    smtpdtls_keyfile = /etc/certificates/youngamericagroup.com.EAC01934DECC18B36C5A42CBFED35A0C2C93C0E 5.key.pem
    smtpdtlsloglevel = 0
    smtpduse_pwserver = yes
    smtpdusetls = yes
    tlsrandomsource = dev:/dev/urandom
    unknownlocal_recipient_rejectcode = 550
    virtualaliasdomains = $virtualaliasmaps
    virtualaliasmaps =
    youngamericagroup:~ administrator$
    Return-Path: <MAILER-DAEMON>
    Delivered-To: [email protected]
    Received: by mail (Postfix)
    id CBBB646C13E; Thu, 30 Dec 2010 11:26:53 -0600 (CST)
    Date: Thu, 30 Dec 2010 11:26:53 -0600 (CST)
    From: [email protected] (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: [email protected]
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
    boundary="4B5E246C13C.1293730013/mail"
    Content-Transfer-Encoding: 7bit
    Message-Id: <20101230172653.CBBB646C13E@mail>
    This is a MIME-encapsulated message.
    --4B5E246C13C.1293730013/mail
    Content-Description: Notification
    Content-Type: text/plain; charset=us-ascii
    This is the mail system at host mail.
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    For further assistance, please send mail to postmaster.
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    The mail system
    <[email protected]>: host plaztex.com[66.117.3.196] said: 550 Access denied -
    Invalid HELO name (See RFC2821 4.1.1.1) (in reply to MAIL FROM command)
    --4B5E246C13C.1293730013/mail
    Content-Description: Delivery report
    Content-Type: message/delivery-status
    Reporting-MTA: dns; mail
    X-Postfix-Queue-ID: 4B5E246C13C
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; plaztex.com
    Diagnostic-Code: smtp; 550 Access denied - Invalid HELO name (See RFC2821
    4.1.1.1)
    --4B5E246C13C.1293730013/mail
    Content-Description: Undelivered Message
    Content-Type: message/rfc822
    Content-Transfer-Encoding: 7bit
    Received: from localhost (localhost [127.0.0.1])
    by mail (Postfix) with ESMTP id 4B5E246C13C
    for <[email protected]>; Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    X-Virus-Scanned: amavisd-new at youngamericagroup.com
    Received: from mail ([127.0.0.1])
    by localhost (youngamericagroup.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id XlYy8X32jZDY for <[email protected]>;
    Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    Received: from [192.168.88.11] (mail.youngamericagroup.com [96.226.0.23])
    by mail (Postfix) with ESMTPSA id 3512046C135
    for <[email protected]>; Thu, 30 Dec 2010 11:26:51 -0600 (CST)
    From: Brian Jagielski <[email protected]>
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit
    Subject: Test
    Date: Thu, 30 Dec 2010 11:26:51 -0600
    Message-Id: <[email protected]>
    To: [email protected]
    Mime-Version: 1.0 (Apple Message framework v1082)
    X-Mailer: Apple Mail (2.1082)
    --4B5E246C13C.1293730013/mail--

  • Intermittent "Access to account "(Account Name)" is not permitted."?

    A couple times today I got the following message:
    "Access to account "(Account Name)" is not permitted.
    The server responded:
    "HTTP/1.1 403 Forbidden"
    to operation CalDAVAccountRefreshQueueableOperation."
    I replaced the real account name with (Account Name) above. A few seconds after I got this message both times, I right-clicked and did a "Refresh" on the calendar and it worked fine. Any idea why I get these messages intermittently?

    Interesting little change...
    Our triangle/cylinder/rhomboid/whatever we're calling it now is configured like this:
    AD OUs and groups. Our domain OD just nests the OUs and groups in OD security groups. iCal (and Wiki) are on a server attached to both AD and that OD, while it's also its own OD master. So the domain OD doesn't actually hold any users, just groups.
    We had an incident Monday where somehow augmented users landed on the OD server. iCal worked perfectly while that was the case. Once the guys removed the users from the OD server, iCal stopped working.
    The users are all also augmented on the iCal server, so I'm confused as to why this would be.

  • Is it "legal" to change a thread's name in Weblogic 8.1/9.2/10.3?

    Hi,
    A very simple question that I couldn't find an answer to:
    Can I change a thread name in a J2EE / Java EE environment? The executing code is an EJB. Will I cause mayham if I change the thread's name to something else?
    I need to know this mainly for Weblogic 8.1 / Java 1.4, since there is no such thing as a "unique thread id" in Java 1.4, so I must generate my own unique thread id and rename the thread. For Java 1.5 and above, there is already a unique thread id.
    Thanks for the help.

    This has been raised as an Enhancement request and has not yet been implemented.
    Bug 6566830 - 8-522961581 - would like ability to customize year description
    This would be useful when the fiscal year is not the same as the calendar year. Example of customization:
    Sep 2006 becomes Sep FY 2006/2007
    HTH-
    Jasmine.

  • Destorying a thread by name?

    Is there any way destroy a thread by name? For example I name a thread musicthread and then call musicthread.destroy().

    ah could be...but still, SUN's own recommendations say that if you want to kill a thread, the way to do it is via a boolean at the top of your run() method.
    As you pointed out, thread.stop() leaves your threads internal data structures in disarray and causes deadlocks which is why they say don't use stop.
    As to citing the exact words, I have no idea what the link was where I read it. But it was on THIS site (not some third party site)...so maybe in the tutorial on Threads or in one of their weekly question and answer tutorials.

  • 550 Access denied-invalid HELO name (See RFC2821 4.1.1.1.1)

    Hello All
    I am facing some problem while sending mail which is as:
    I have developed a form for sending mail with attachment for this i am using smtp mail server. For this i get some help from OTN. It work well on XP Operating System but when it deployee on Window professional 2003 SP2 (server) then it give message as
    Oracle.forms.demos.javamail.SendMessageException:
    SendMessage: 550 Access denied-invalid HELO name (See RFC2821 4.1.1.1.1)
    Please help me.
    Thanks in Advance.

    Most likely the name service isn't properly configured on your Windows machine
    and it can't get the correct host name for your machine. You can try working
    around the problem by setting the mail.smtp.localhost property; see the javadocs
    for the com.sun.mail.smtp package.

  • Newbee: How to access fields with duplicated names?

    How can i access fields where the name already exists (Like FieldName[0], FieldName[2],...) - and where else can i get answers to simple questions like this one?
    Fieldname[n].thisValue does not work.
    Thanks for help.

    xfa.resolveNode("FieldName["0"]") etc.. I think should work

  • Permission required to access oracle client service names

    Hello,
    I  actually have a problem with accessing oracle client service names in Crystal.
    The problem is:
    I installed crystal reports 2008 and installed oracle client on a machine (I used an account that is a local administrator of the machine during installation) but the problem is that the users who are going to access crystal are standard users and they couldnu2019t access the services in oracle client and when they try to refresh the report they get the following error
    "Failed to load database information. Details: the DB connector 'crdb_oracle.dll' couldn't be loaded. the correct version of the database client for this database type might not be installed"
    I gave the users permission on the two folders (C:\program files \Common files \) and RegEdit : (C:\Windows \ System 32\) but the problem wasnu2019t solved so I made them local administrators and the problem was solved but I donu2019t want to make the users  local administrators on the machine , some people told me that I have to install oracle client with the user who will be using crystal but the problem is that two users will be working on the machine not just one and they have two different accounts and when I tried to give the users full control permission on oracle folder , the problem wasnu2019t solved, So I wanted to know if any one faced a similar problem and how to solve it without making the users local administrators.
    Thanks in advance.

    Hello,
    It appears you have everything installed and configured for Cr to work so it looks like it's a DB issue.
    What do you see in the logs if you enable logging on the Server? Are your requests even getting to the Server from CR under the user account?
    Test it using the admin and then the user account.
    You could try checking on the option to use Trusted Authentication in the database log on windows of CR. This should pass the users PC log on credentials to the Server.
    Thank you
    Don

  • Oracle 10G R2: Cannot access a table whose name is a reserved keyword

    Hello,
    Oracle 10G R2 database being accessed using Oracle 10G thin driver in Java.
    There is a table named GROUP in the db - GROUP is a reserved keyword of course.
    When I execute the statement (after getting the database metadata object from a java.sql.Connection to the DB):
    oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(null, "MYDB", "GROUP", false, true)
    I get:
    Exception in thread "main" java.sql.SQLException: ORA-00903: invalid table name
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
    at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1606)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1571)
    at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3485)
    When I execute the statement:
    oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(null, "MYDB", "\"GROUP\"", false, true)
    the result set is empty
    What is the correct way for me to get the index info from the table named GROUP?
    Thanks,
    Sundeep

    user5486925 wrote:
    oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(null, "MYDB", "\"GROUP\"", false, true)
    the result set is empty
    Which would suggest you are using the correct name as a quoted identifier. Presumably the code you are using works for other tables. But you might try variations in case.
    You can also query the database directly to get the index information rather than using the metadata.
    What is the correct way for me to get the index info from the table named GROUP?The correct way is to not use reserved words.

  • Access website with same name as internal dns...

    Hi there
    I've set up a server with internal dns zone as 'example.com' with the machine name being 'server.example.com'
    Everything has been going well, but we cannot now access our externally hosted website at 'www.example.com' I now realise from looking at other posts on the web that perhaps I should have not used the same dns address internally as is used externally, but we have plans to bring mail servers in-house and so thought that this would be the correct way to go.
    Can anyone offer advice on the correct way to resolve this?
    Thanks

    From what you're saying then, I need to change the DNS host name of the internal network to example.net or similar.
    You can use a level within your own domain, such as server.internal.example.com, where server is the host name and internal identifies a host within your network, and example.com is a domain you own. Larger networks use this construct to identify hosts within a corporate site or a particular building, such as www.corp.example.com, www.frobnitz.example.com and www.boston.example.com.
    I assume it doesn't matter if I don't own the domain example.net?
    Do not use a domain that you do not have permission to use.
    Only use domains you own (best), or domains that will never be activate.
    It's best if you use a domain you own or a subdomain of a domain you own, or (less desirably, but functional) use a Top Level Domain (TLD) string that will never be a domain (a completely made-up domain such as server.tvkiddomain where tvkitdomain is a text string that will never match a real domain such as .COM or .NET or .BIZ or .TRAVEL or the country codes or the gazillions of these TLD strings that are coming on-line. (That there are TLDs coming on-line makes this somewhat more risky; you can end up using a domain you don't own of somebody lights up a matching TLD.)
    The second parallel domain is small cost and simple, particularly as you need few or no services for it from your registrar. (When I buy domains for a site, I usually purchase several TLDs around the domain -- such as the classic big three .COM, .NET and .ORG -- and then have these available for just this sort of purpose. It's easier to buy these up front than to add them later, given the usual domain squatting that can happen. And it's not much money. And it's flexibility for later network activities, and far easier to describe and to support.)
    Will the changeip command change the DNS name of machines that I've set up, so that server.example.com will be renamed server.example.net? I assume I'll need to unbind and rebind any client machines that I've bound to the server?
    changeip would be the tool I'd use, yes. And I'd reconnect, yes. There's a DNS command around that flushes the DNS caches on the clients; you'll also need to clear that.
    Prior to Leopard, on each DNS client:
    sudo lookupd -flushcache
    Leopard DNS cache flush, on each DNS client:
    sudo dscacheutil -flushcache
    Thanks for the pointer to the other post, was helpful, but I think that changing the internal DNS host name will be the simplest option...
    IMO, the simplest option is to avoid domain name collisions and to avoid domains you don't own; to maintain the basic operations and assumptions of DNS.
    Bad DNS is one of the few things you can do that can screw up other hosts and other sites on the Internet.

  • Gmail access through Mail : Attachment name and extension terminated

    When I try to send an attachment through Gmail using Mail, if the attachment names have more than one word with spaces in them, the entire name is terminated to the first few letters before the space and the file extension is lost too; so the recipients end up having incomplete file names without any extension. The files transfer perfectly and once the extensions are put in, they open without a problem. Receiving attachments where the names have spaces etc. is not a problem at my end though.
    Any idea what I should tweak?
    Thanks.

    All updates are installed regularly, so I am indeed at the newest version of all available software. I just haven't updated my signature here.
    And the name of the attachment is mangled only when I use the client to send an attachment to any other Gmail account ( both Windows or Mac, accessed either through a client or directly at the receiving end). The same email cc'd to my school address shows the entire file name. And if I send the email through Gmail directly, then it is fine too, as I mentioned.
    Message was edited by: Deep Blue to change the OS version.

  • Accessing the sender file name in the response email

    Hi,
    I have an asynchronous proxy scenario wherein I am calling an outbound proxy within an inbound proxy.
    Basically a file is sent from an external partner and response is sent back to them if there are any errors. Also email notification will be sent and that email should include the sender file name so that they can know which file is erroneous and can resend that file after making changes. Any help will be appreciated.
    Many Thanks.

    Hi,
    Have a look just two threads below yours !!
    File recr Adapter : How to set target directory based on sender interface ?
    See "Adapter-Specific Message Attributes" for a Sender File Adapter
    http://help.sap.com/saphelp_nw70/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm
    I suppose your flow is:
    1. File -> PI -> proxy_req     (request)
    2. proxy_resp -> PI -> Mail   (response)
    Thanks to "Adapter-Specific Message Attributes" ofr a Sender File Adapter, you will be able to store filename in DynamicConfiguration and then you will able to use a UdF to catch the source file and provide it somewhere in your proxy_req.
    After for the returned flow "2. proxy_resp -> PI -> Mail   (response)", your proxy_resp has to returned to PI the filename providen with the 1st step.
    And then, In PI you will be able to send by email the source filename.
    Regards.
    Mickael

  • Accessing Crystal Report's name in BI Customer Exit

    Hi Experts,
    Is it possible to access the name of Crystal Report in BI Customer Exit?
    Regards,
    Ajay

    Thanks Don,
    BI cstomer exit means CMOD of Business Intelligence.  Actuualy i want to control scheduling or publishing of Crystal Report from BI side...is it possible or whether through some API's  we can do it or not.
    Please tell if i have to post question in the forum suggested by u you or some other forum.
    Regards,
    Ajay

  • Accessing username and group name from an external app

    How can I access the user name and group name from an external app..? Where is that stored..?
    Thanks
    Fernando

    Post Author: pvierheilig
    CA Forum: Crystal Reports
    Each BOE document has a unique ID.  Knowing that will allow you to access it via a URL while passing required login credentials as well, if I recall correctly.  However, your very best bet is to review the SDK.

Maybe you are looking for