Declaring callbacks via config file: assigning method from a string

Hello together,
For a game project I am using Apache Commons Digester for creating object trees from an XML config (done by XML to object mapping just like in Castor or Betwixt).
For the configugration of the keyboard, I would like to declare callback methods that the keyboard class shall invoke on a given object, e.g.:
<keyboard>
<event key="F11" method="Engine.getDisplay.toggleFullscreen()" />
</keyboard>
The main problem I see to interprete the thing in the method attrib? What is the best method to create this binding in my source? Are there any utils you know or do I have to parse the string myself in order to realise such a callback? I.e. how to get an instance of java.lang.reflect.Method from such a string?
Thank you for any proposals!
Greetings, Timo

I know you can loop through the methods of the given class and look for one with the right signature.

Similar Messages

  • Locking GUI of Cisco IP terminals leaving terminal unlock | via config file

    Hi Guys, 
    On the Cisco SPA VoIP handset range, there is an option for a 'System  Configuration User Password'.
    This feature allows additional security  within the GUI and also locks down some of the menus on the phones.
    These phone menus can be overridden, leaving the GUI password in  place.  However, this is a manual process on the phone itself.
    Is there any way  of removing the user password on the handset, but  keeping it live on the  GUI and to do this all via the config file.
    Regards
    Shivam

    What version is the older AP's on and what version is the new ones running?  There were some changes with the config formatting between certain versions.  Make sure all the AP's are running the same version and try loading the config again.

  • Locking GUI of IP phones leaving terminal unlock | via config file

    Hi Guys,
    On the Cisco SPA VoIP handset range, there is an option for a 'System  Configuration User Password'. This feature allows additional security  within the GUI and also locks down some of the menus on the phones.  These phone menus can be overridden, leaving the GUI password in place.  However, this is a manual process on the phone itself. Is there any way  of removing the user password on the handset, but keeping it live on the  GUI and to do this all via the config file.
    Regards
    Shivam

    Hi Guys,
    On the Cisco SPA VoIP handset range, there is an option for a 'System  Configuration User Password'. This feature allows additional security  within the GUI and also locks down some of the menus on the phones.  These phone menus can be overridden, leaving the GUI password in place.  However, this is a manual process on the phone itself. Is there any way  of removing the user password on the handset, but keeping it live on the  GUI and to do this all via the config file.
    Regards
    Shivam

  • SPA122 Timezone Change via Config File

    Hi,
    I have been modifying the default XML cfg file that is created by the config compiler for the SPA112/122. Everything has been going smoothly apart from the time settings. On the SPA122 the config reads as follows:
    <Time_Setup>
    <Time_Zone>-08 1 1</Time_Zone>
    <Auto_Adjust_Clock>1</Auto_Adjust_Clock>
    <Time_Server_Mode>manual</Time_Server_Mode>
    <Time_Server>europe.pool.ntp.org</Time_Server>
    <Resync_Timer>3600</Resync_Timer>
    <Auto_Recovery_System_Time>0</Auto_Recovery_System_Time>
    <Time_Mode>1</Time_Mode>
    </Time_Setup>
    Now the "-08 1 1" under the timezone entry is for US Pacific Time, so GMT -08. I need to make the entry GMT 0 for UK time. I have tried a few different strings but these get ignored everytime. Does anyone know the options you have under this entry or what to set for UK time?
    Best regards
    Rob

    Try to set the GMT 0 in the web GUI and get the xml config using this special url:
    http://SPAIPaddress/admin/config.xml
    In this way you can find the exact value used by SPA.
    Regards.

  • Can a config file be copied from one iPhone to another?

    I want to copy a config profile from my iPhone to my wife's iPhone.  I know you can install a profile from your PC to the iPhone with the config utility, but I can't find out how to copy it back from the iPhone. Can it be done?   I lost the original file from my PC and didn't want to re-create it.  Thanks!

    That is disappointing.  Is there a way to read its contents so it can recreated in the config tool?

  • Paging via SNPP (or other method) from a PDF document

    I have created a form that a user fills in. This form then compiles this data into a condensed formatted message to be sent to an alpha numeric pager. Right now the user has to copy the formatted text and past it into another program to sent the message. I have been trying to find a way to send the message to the server directly from the document. Anyone have any ideas? I have been focusing on trying to implement SNPP via JavaScript but SNPP requires an ability to respond to a returned message from the server and I'm not sure JavaScript is capable of dynamic communication like this. I think all I'm left with is wishful thinking. I have even tinkered around with trying to incorporate the use of Telnet but I think from a PDF document this may also be a lost cause.

    Use a webservice.  Acrobat has a built-in SOAP engine.

  • Advice on config file

    Hi guys and gals. I currently use a config.ini file for all my database set up (URL, driver manager, etc). My application is made up of two JAR files, one for the server-side, one for the client. I have put my config file in with my JAR and call it like so:
    InputStream is = ClassLoader.getSystemResourceAsStream("com/dmsltd/rmi/config.ini");
    As you can see I have put it into the rmi package of my application. Is this a sensible place? I am starting to think not. Would it make more sense to have the config.ini file outside my JAR file? The reason I ask is what if the network administartor at a site decides to change the IP address of a machine, or decides to use a different port number for RMI calls...this would require changing the config file + re-archiving. If the config file was called from outside the JAR, all that would need to be changed would be the config file.
    If anyone can steer me in the best direction, I would be ever so grateful.

    I suspect I wouldn't be able to use the ClassLoader to access a file from outside the JAR file. Not so, the technique you used there should find the file anywhere in your classpath. So it doesn't have to be in a JAR file, it could be in a directory in your classpath.

  • Missing palette - Config Files

    The Config Files are missing from the subpalette in LV 2014-64 bit for Mac OS.  I am not sure whether they were ever there. The files are in the expected locations. The palette is OK in the 32-bit version.
    I have installed a bunch of stuff with VIPM and this may have contributed to the problem.
    What I have tried:
    Edit Palette Set... Restore to Default and Insert VIs.
    Re-install LV.
    Delete the config.mnu file.
    Edit Palette Set... Delete icon. Insert subpalette. ... This gets me a config subpalette which contains every file in config.llb, not just the subset in the original subpalette.
    So I am now to the point where I can work again but I would still like to get back to the default palette.  Any suggestions?
    Thanks,
    Lynn

    Try copying the mnu file from your 32-bit install (since that one works).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there will be any impact on chaging below property in config file

    Hi,
    I need one help on RequestValidation property in config file.
    I have Changed property in config file RequestValidation=”true” from RequestValidation=”false” .Please let us know is there is any impact on changing this property.If there is an impact then how it needs to be tested and what areas will be impacted.
    I am thinking this would only restrict the scirpts not being submitted to page.
    Please help me in this.
     Thanks,
    Vijay.

    Hi Vijay,
    Welcome to MSDN forum.
    Your issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because the RequestValidation property is related to ASP.NET, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Phase 1 Encryption Method in Config File

    OK...  I see the statement for the declaration of Encryption for Phase 2.  It is clear in the Crypto Map section.  Where in the config file is the Phase 1 encryption method defined for a given IPSec Tunnel?
    Thanx

    Hi,
    From the ASA CLI you should be able to see all the phase 1 policies configured on the ASA with the command "show run crypto". They are at the very end.
    Each of the policies have a priority number in which order they are checked when a VPN connection is being formed.
    To my understanding none of them are locked to a certain VPN connection on your ASA. They are gone through with the other VPN device/client in the Phase1 negotiations until they find a policy match that both devices have.
    In my 8.4(3) ASA I for example have the policies like this
    crypto ikev1 policy 30
    authentication pre-share
    encryption aes-256
    hash sha
    group 2
    lifetime 86400
    crypto ikev1 policy 60
    authentication pre-share
    encryption aes-192
    hash sha
    group 2
    lifetime 86400
    For the older software the format might be different.
    Like
    "crypto isakmp policy 10"
    - Jouni

  • Trying to dynamically load CSS for project at compile time via config XML file to select CSS file.

    I'm using the same code base to compile different versions of a project. Each project has different base fonts. I've created multiple css files that use the same style names. The idea being that in the code I reference the style names, then the loaded CSS determines which font (and size, color, etc) is used for each style name.
    The CSS files are compiling to SWFs, and those SWFs are referenced in config.xml files. Before compiling, I select the config file to use.
    I am loading the CSS SWF files via the StyleManager in the Application.mxml, like so:
      styleManager.loadStyleDeclarations( _contentData.elements( 'cssPath' ).@path )
    The path traces out correctly as:
    assets_embed/styles/project2.swf
    For some reasone I must include an fx:Style line in the Application.mxml file or no fonts are recognized. Example:
      <fx:Style source="assets_embed/styles/project1.css"/>
    If I reference the css for project one (as done above) then most, but not all, styles work. Some styles reference the fonts from the project 1 css, others properly use fonts from project 2 swf. If I point to the CSS for the project I'm compiling in the <fx:Style > tag then all fonts work, but that defeats the goal of using XML rather than code to identify the styles.
    So, why do I need the fx:Style line if the css is being loaded via StyleManager?
    Why is there "cross talk" between style definitions?
    Is there a better way to select styles at compile time?

    I read this quickly so I might have missed a detail.  I think your describing an issue with recent Flex releases that is described in the fine print somewhere.  If you don't have any fonts embedded in the main app and are only bringing in fonts embedded in CSS SWFs, you have to force-link the EmbeddedFontRegistry by adding something like this to the main app's script block.
    import mx.core.EmbeddedFontRegistry; EmbeddedFontRegistry;
    (Yes, "EmbeddedFontRegistry" is in there twice, once to define the fully qualified name, the other to create a class dependency to force the linking).

  • How to access variables declared in java class file from jsp

    i have a java package which reads values from property file. i have imported the package.classname in jsp file and also i have created an object for the class file like
    classname object=new classname();
    now iam able to access only the methods defined in the class but not the variables. i have defined connection properties in class file.
    in jsp i need to use
    statement=con.createstatement(); but it shows variable not declared.
    con is declared in java class file.
    how to access the variables?
    thanks

    here is the code
    * testbean.java
    * Created on October 31, 2006, 12:14 PM
    package property;
    import java.beans.*;
    import java.io.Serializable;
    public class testbean extends Object implements Serializable {
    public String sampleProperty="test2";
        public String getSampleProperty() {
            return sampleProperty;
    }jsp file
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <html>
    <head>
    <title>Schedule Details</title>
    </head>
    <jsp:useBean id="ConProp" class="property.testbean"/>
    <body>
    Messge is : <jsp:getProperty name="msg" property="sampleProperty"/>
    <%
      out.println(ConProp.sampleProperty);
    %>
    </body>
    </html>out.println(ConProp.sampleProperty) prints null value.
    is this the right procedure to access bean variables
    thanks

  • Transfer old config files from old C150 to New C170

    I exported the complete configuration from the old C150  and emailed it to myself without masked passwords.  I copied the file to my machine and logged into the new C170. System Administration --> Configuration File
    Selected Load Configuration file from local computer.  I browsed to the file and seleted it and hit "load"
    It failed on so many lines that just seemed incompatible with the new XML structure I just gave up.  I ended up doing it manually but would like to know if it is possible to accomplish the original task of importing that old config file?

    The dievices have different port settings and there are some large differences in the code.  You cannot transfer the entire config file but you can do it in sections.  Such as export your HAT config and import that to the C170. 
    How I did it was hook a laptop directly to the new C170 on the management port and opened a wireless connection via browser to the live C150 and manually set all of my network configurations individually.

  • Call Java Method from Callback function

    I am writing a JNI wrapper in c++ for a particular event driven DLL. The DLL makes a network connection to another device and then calls a callback function when events are raised on the device. The DLL has 3 basic functions: connect, disconnect, and registerEventListener. RegisterEventListener takes a function pointer which is called each time an event is raised on the device.
    My wrapper DLL exposes connect and disconnect functions via JNI. I can call these functions just fine from my Java code. Now the question... How do I call a Java method from my c++ callback function? I can call a Java method using env->CallXXXMethod(...) from within a function that is accessible to Java but I don't have access to the JNI parameters in my Callback function.
    So how do I call a Java method from a callback function? If this cannot be done then what is the "right way" to handle native event notification with JNI?

    jschell wrote:
    JNI parameters? Meaning what exactly?
    General outline of a callback
    1. Entry
    2. Get the VM, env - there are methods for this
    3. Attach the thread
    4. Get a java object - how depends on what you are doing, but create it or a static reference.
    5. Get the java method
    6. Call the java method.That is exactly correct. The callback function is called from a separate thread so using a cached pointer to JNIEnv, obtained from the original native method, crashes the JVM. The jmethodID and jclass objects (which are needed to call the static Java method) can be cached without problem. The following is the code I used to attach the current thread and call my static method.
    void MyClass::onEvent(int system_id, char* data)
         //get a pointer to the Java Environment
         JNIEnv *env;
         jvm->AttachCurrentThread((void **)&env, NULL);
         //Call the Java method with the newly aquired data
         jstring js = env->NewStringUTF(data);
         env->CallStaticVoidMethod(cls, mid, system_id, js);
    }My last question is about cleanup in this function. When I use NewStringUTF to "convert" my char* to jstring do I need to do anything special to clean up or will the Java garbage collector take care of it since the jstring is being passed to a Java method?
    Thanks for you help

  • Reload config file bug  to be mindful of self assigned IP address

    I did a an export of the config of my 4 routers, then reset them all to factory defaults, then reloaded all the config files.
    All the outlying routers were non connectable and had yellow flashing lights. I connected to each manually with an ethernet cable and laptop and found that each had a self assigned IP address.
    I went back to the main router and found that the check mark to allow the network to be extended did not re-check during the config file restore. Once I manually checked the box, all the routers automatically came on line.

    Hi mpedruski, and a warm welcome to the forums!
    The "self-assigned IP address" simply means that it is not getting a reply from anything like a Router handing out DHCP IPs.
    The Interface that connects to the Internet, needs to be drug to the top of Network>Show:>Network Port Configurations and checked ON.
    Might pay to make a New Location for each...
    Sometimes having an all OFF Location can help, thanks to Gnarlodious...
    http://gnarlodious.com/Computer/MacOsx/WiFi
    Using network locations in Mac OS X ...
    http://docs.info.apple.com/article.html?artnum=106653
    Let us know where we stand after this.

Maybe you are looking for