Examples of JsonHandler


Examples of ch.ralscha.extdirectspring.util.JsonHandler

    if (configuration.getJsonHandler() != null) {
      jsonHandler = configuration.getJsonHandler();
    }

    if (jsonHandler == null) {
      jsonHandler = new JsonHandler();
    }

    if (routerExceptionHandler == null) {
      routerExceptionHandler = new DefaultRouterExceptionHandler(this);
    }
View Full Code Here

Examples of com.bleujin.framework.db.bean.handlers.JSONHandler

  }
 
  public JSONObject execute() throws SQLException{
    if (commandType == IQueryable.QUERY_COMMAND){
      Rows rows = query.execQuery() ;
      return (JSONObject) rows.toHandle(new JSONHandler());
    } else {
      int rowcount = query.execUpdate() ;
      JSONObject body = new JSONObject() ;
      body.put("ROWCOUNT", rowcount) ;
     
View Full Code Here

Examples of com.mcbans.firestar.mcbans.request.JsonHandler

        plugin.syncRunning = true;
       
        try{
            boolean goNext = true;
          while(goNext){
                JsonHandler webHandle = new JsonHandler( plugin );
                HashMap<String, String> url_items = new HashMap<String, String>();
                url_items.put( "lastId", String.valueOf(plugin.lastID) );
                url_items.put( "lastType", String.valueOf(plugin.lastType) );
                url_items.put( "exec", "banSync" );
                JSONObject response = webHandle.hdl_jobj(url_items);
                try {
                    if(response.has("actions")){
                        if (response.getJSONArray("actions").length() > 0) {
                            for (int v = 0; v < response.getJSONArray("actions").length(); v++) {
                              JSONObject plyer = response.getJSONArray("actions").getJSONObject(v);
View Full Code Here

Examples of com.mcbans.firestar.mcbans.request.JsonHandler

        try{
            boolean goNext = true;
            plugin.lastID = 0;
            plugin.lastType = "bans";
            while(goNext){
                JsonHandler webHandle = new JsonHandler( plugin );
                HashMap<String, String> url_items = new HashMap<String, String>();
                url_items.put( "lastId", String.valueOf(plugin.lastID) );
                url_items.put( "lastType", String.valueOf(plugin.lastType) );
                url_items.put( "exec", "banSync" );
                JSONObject response = webHandle.hdl_jobj(url_items);
                try {
                    if(response.has("actions")){
                        if (response.getJSONArray("actions").length() > 0) {
                            for (int v = 0; v < response.getJSONArray("actions").length(); v++) {
                              JSONObject plyer = response.getJSONArray("actions").getJSONObject(v);
View Full Code Here

Examples of com.mcbans.firestar.mcbans.request.JsonHandler

        try{
            boolean goNext = true;
            plugin.lastID = 0;
            plugin.lastType = "bans";
            while(goNext){
                JsonHandler webHandle = new JsonHandler( plugin );
                HashMap<String, String> url_items = new HashMap<String, String>();
                url_items.put( "lastId", String.valueOf(plugin.lastID) );
                url_items.put( "lastType", String.valueOf(plugin.lastType) );
                url_items.put( "exec", "banSync" );
                JSONObject response = webHandle.hdl_jobj(url_items);
                try {
                    if(response.has("actions")){
                        if (response.getJSONArray("actions").length() > 0) {
                            for (int v = 0; v < response.getJSONArray("actions").length(); v++) {
                              JSONObject plyer = response.getJSONArray("actions").getJSONObject(v);
View Full Code Here

Examples of com.mcbans.firestar.mcbans.request.JsonHandler

        long d = 99999;
        String fastest = null;
        for (String server : apiServers) {
            try {
                long pingTime = (System.currentTimeMillis());
                JsonHandler webHandle = new JsonHandler(plugin);
                HashMap<String, String> items = new HashMap<String, String>();
                items.put("exec", "check");
                String urlReq = webHandle.urlparse(items);
                String jsonText = webHandle.request_from_api(urlReq, server);
                if (jsonText.equals("up")) {
                    long ft = ((System.currentTimeMillis()) - pingTime);
                    log.info("API Server found: " + server + " :: response time: " + ft);

                    if (d > ft) {
View Full Code Here

Examples of com.mcbans.firestar.mcbans.request.JsonHandler

    public void goRequest() {
        mainRequest();
    }

    private void mainRequest(){
        JsonHandler webHandle = new JsonHandler( plugin );
        HashMap<String, String> url_items = new HashMap<String, String>();
        url_items.put( "maxPlayers", String.valueOf( plugin.getServer().getMaxPlayers() ) );
        //url_items.put( "playerList", this.playerList() );
        url_items.put( "version", plugin.getDescription().getVersion() );
        url_items.put( "exec", "callBack" );
        HashMap<String, String> response = webHandle.mainRequest(url_items);
        try {
            if(response.containsKey("hasNotices")) {
                for(String cb : response.keySet()) {
                    if (cb.contains("notice")) {
                        Perms.VIEW_BANS.message(ChatColor.GOLD + "Notice: " + ChatColor.WHITE + response.get(cb));
View Full Code Here

Examples of org.apache.qpid.disttest.json.JsonHandler

    @Override
    protected void setUp() throws Exception
    {
        super.setUp();

        _jsonHandler = new JsonHandler();

        _testCommand = new SendChristmasCards(CommandType.START_TEST, Collections.singletonMap(SendChristmasCards.CardType.FUNNY, 5));
        _testCommand.persons = Arrays.asList(new Person("Phil"), new Person("Andrew"));
    }
View Full Code Here

Examples of org.apache.qpid.disttest.json.JsonHandler

        Message jmsMessage = null;
        try
        {
            jmsMessage = session.createMessage();
            jmsMessage.setStringProperty(DistributedTestConstants.MSG_COMMAND_PROPERTY, command.getType().name());
            final JsonHandler jsonHandler = new JsonHandler();
            jmsMessage.setStringProperty(DistributedTestConstants.MSG_JSON_PROPERTY, jsonHandler.marshall(command));
        }
        catch (final JMSException jmse)
        {
            throw new DistributedTestException("Unable to convert command " + command + " to JMS Message", jmse);
        }
View Full Code Here

Examples of org.apache.qpid.disttest.json.JsonHandler

        Command command = null;
        try
        {
            final CommandType commandType = CommandType.valueOf(jmsMessage
                            .getStringProperty(DistributedTestConstants.MSG_COMMAND_PROPERTY));
            final JsonHandler jsonHandler = new JsonHandler();
            command = jsonHandler.unmarshall(jmsMessage.getStringProperty(DistributedTestConstants.MSG_JSON_PROPERTY),
                            getCommandClassFromType(commandType));
        }
        catch (final JMSException jmse)
        {
            throw new DistributedTestException("Unable to convert JMS message " + jmsMessage + " to command object",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.