Results 1 to 5 of 5

Thread: Plugin problem with java

  1. #1
    Join Date
    Mar 2010
    Posts
    162

    Plugin problem with java

    Hello,
    I have a problem with the plugin in java.

    - I have two types of plugins (client and server). Both running at the server. But one concerns the orders entered by customers and the other at the server.

    Then I have the following classes
    - Interface BasicClient
    - Interface AdvaceClient extends BasicClient

    plugins customers can access BasicClient, but they are prohibited from accessing AdvaceClient. How is this possible? Any explanation will be appreciated.

  2. #2
    Join Date
    Dec 2009
    Posts
    202

    Re: Plugin problem with java

    Hello,
    I am not pro in java, but i have code with me that can interest you. Take a look at the following source code

    Code:
    interface bsccln
    {}
     
    interface advcln extends bsccln
    {}
     
    class ClientPlugin
    {
       Public ClientPlugin(bsccln customer)
       {
          advcln cl = customer / / Disallow the user to ca ...
        / / For the plugin client can not access the IAdvanceCLient ... )
    }

  3. #3
    Join Date
    Nov 2009
    Posts
    330

    Re: Plugin problem with java

    Hello,
    The client spent bsccln being kind, that creator plugins necessarily should do is cast explicitly to get a advcln
    Code:
    advcln cl = (advcln) client;
    But this works only if the customer you send them is really kind advcln. Otherwise, they will end up with a ClassCastException. So the only thing you have to make sure is to send only bsccln that is this method. I hope you have understood what I am trying to explain here.

  4. #4
    Join Date
    Mar 2010
    Posts
    162

    Re: Plugin problem with java

    Hello,
    The problem is that the kit to develop the plugins does not contain the given method. So, there will be a problem to implement your solution.
    Code:
     advcln cl = (advcln) client;
    I've seen:
    - Interface bsccln
    - advcln interface extends bsccln
    - Class Client implements advcln
    and that in my program I instantiate this. Is there any other way to do this, if there is any then please let me know, I am the interested one here. Thanks in advance.

  5. #5
    Join Date
    Nov 2009
    Posts
    335

    Re: Plugin problem with java

    Hello,
    See, if this code helps you.
    Code:
    package sample.plugin;
    
    /**
     * Says "Hi" to the user.
     * @goal sayhi
     */
    public class grt extends AbstractMojo
    {
        public void execute() throws MojoExecutionException
        {
            getLog().info("Hello, world.");
        }
    }

Similar Threads

  1. How to remove java plugin 2 ssv helper from internet explorer 9.
    By Haimi-32 in forum Technology & Internet
    Replies: 3
    Last Post: 03-03-2012, 01:01 PM
  2. Backtrack 5-Java Plugin Firefox 4.0.1 x64
    By Haleema in forum Operating Systems
    Replies: 5
    Last Post: 25-06-2011, 02:08 AM
  3. Firefox 3.6.8 doesn't recognize java 1.6 plugin
    By Neutrals in forum Windows Software
    Replies: 4
    Last Post: 20-08-2010, 06:32 AM
  4. Java JRE plugin for Mozilla Firefox
    By SoftWore in forum Technology & Internet
    Replies: 2
    Last Post: 26-07-2010, 05:09 PM
  5. Java Card 2.1.1 Plugin for Eclipse
    By Marjorie in forum Software Development
    Replies: 5
    Last Post: 23-07-2010, 01:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,004,397.74215 seconds with 16 queries