Package org.knopflerfish.service.console

Examples of org.knopflerfish.service.console.Session


                                // possible to
                                // configure the console to not use the timeout
                                if (useTimeout.booleanValue()) {
                                    client.setSoTimeout(3000);
                                }
                                Session s = cs.runSession(session, in, out);
                                Dictionary props = s.getProperties();
                                if (authorization != null) {
                                    props.put(Session.PROPERTY_AUTHORIZATION,
                                            authorization);
                                }
                                props.put(Session.PROPERTY_TCP, new Boolean(
                                        true));
                                if (exitOnLogout.booleanValue()) {
                                    props.put(Session.PROPERTY_EXIT_ON_LOGOUT,
                                            new Boolean(true));
                                    /*
                                     * Add properties to session to be able to
                                     * exit on login? if (requiredGroup != null) {
                                     * props.put(Session.PROPERTY_REQUIRED_GROUP,
                                     * requiredGroup); } if (forbiddenGroup !=
                                     * null) {
                                     * props.put(Session.PROPERTY_FORBIDDEN_GROUP,
                                     * forbiddenGroup); }
                                     */
                                }

                                sessions.put(s, client);
                                s.addSessionListener(thisSessionListener);
                                s.setInterruptString(TELNET_INTERRUPT);
                                log(LogService.LOG_INFO, "Started " + session);
                            } catch (IOException e) {
                                log(LogService.LOG_ERROR,
                                        "Failed to get input or output from socket to console session: "
                                                + e);
View Full Code Here


      }
      Dictionary opts = cg.getOpt(args, cmd.usage);
     
     
      Reader in = new InputStreamReader(System.in);
      Session session = null;
      cmd.cmd.invoke(cg, new Object[] { opts, in, out, session  });
     
      System.out.println(sout.toString());
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.knopflerfish.service.console.Session

Copyright © 2018 www.massapicom. 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.