test_class.declarator: groovysh = new Groovysh()
test_class.modifier: private final
test_class.original_string: private final Groovysh groovysh = new Groovysh();
test_class.type: Groovysh
test_class.var_name: groovysh
test_class.declarator: acceptor
test_class.modifier: private
test_class.original_string: private DriverRemoteAcceptor acceptor;
test_class.type: DriverRemoteAcceptor
test_class.var_name: acceptor
test_class.file: gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptorTest.java
test_class.identifier: DriverRemoteAcceptorTest
test_case.body: @Test(expected = RemoteException.class)
      public void shouldNotConnectWithTooManyArgs() throws Exception {
          acceptor.connect(Arrays.asList("two", "too", "many"));
      }
test_case.class_method_signature: DriverRemoteAcceptorTest.shouldNotConnectWithTooManyArgs()
test_case.full_signature: @Test(expected = RemoteException.class) public void shouldNotConnectWithTooManyArgs()
test_case.identifier: shouldNotConnectWithTooManyArgs
test_case.invocations: connect asList
test_case.modifiers: @Test(expected = RemoteException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotConnectWithTooManyArgs()
focal_class.declarator: NO_TIMEOUT = 0
focal_class.modifier: public static final
focal_class.original_string: public static final int NO_TIMEOUT = 0;
focal_class.type: int
focal_class.var_name: NO_TIMEOUT
focal_class.declarator: currentCluster
focal_class.modifier: private
focal_class.original_string: private Cluster currentCluster;
focal_class.type: Cluster
focal_class.var_name: currentCluster
focal_class.declarator: currentClient
focal_class.modifier: private
focal_class.original_string: private Client currentClient;
focal_class.type: Client
focal_class.var_name: currentClient
focal_class.declarator: timeout = NO_TIMEOUT
focal_class.modifier: private
focal_class.original_string: private int timeout = NO_TIMEOUT;
focal_class.type: int
focal_class.var_name: timeout
focal_class.declarator: aliases = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String,String> aliases = new HashMap<>();
focal_class.type: Map<String,String>
focal_class.var_name: aliases
focal_class.declarator: session = Optional.empty()
focal_class.modifier: private
focal_class.original_string: private Optional<String> session = Optional.empty();
focal_class.type: Optional<String>
focal_class.var_name: session
focal_class.declarator: TOKEN_RESET = "reset"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_RESET = "reset";
focal_class.type: String
focal_class.var_name: TOKEN_RESET
focal_class.declarator: TOKEN_SHOW = "show"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_SHOW = "show";
focal_class.type: String
focal_class.var_name: TOKEN_SHOW
focal_class.declarator: TOKEN_MAX = "max"
focal_class.modifier: @Deprecated
      private static final
focal_class.original_string: @Deprecated
      private static final String TOKEN_MAX = "max";
focal_class.type: String
focal_class.var_name: TOKEN_MAX
focal_class.declarator: TOKEN_NONE = "none"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_NONE = "none";
focal_class.type: String
focal_class.var_name: TOKEN_NONE
focal_class.declarator: TOKEN_TIMEOUT = "timeout"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_TIMEOUT = "timeout";
focal_class.type: String
focal_class.var_name: TOKEN_TIMEOUT
focal_class.declarator: TOKEN_ALIAS = "alias"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_ALIAS = "alias";
focal_class.type: String
focal_class.var_name: TOKEN_ALIAS
focal_class.declarator: TOKEN_SESSION = "session"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_SESSION = "session";
focal_class.type: String
focal_class.var_name: TOKEN_SESSION
focal_class.declarator: TOKEN_SESSION_MANAGED = "session-managed"
focal_class.modifier: private static final
focal_class.original_string: private static final String TOKEN_SESSION_MANAGED = "session-managed";
focal_class.type: String
focal_class.var_name: TOKEN_SESSION_MANAGED
focal_class.declarator: POSSIBLE_TOKENS = Arrays.asList(TOKEN_TIMEOUT, TOKEN_ALIAS)
focal_class.modifier: private static final
focal_class.original_string: private static final List<String> POSSIBLE_TOKENS = Arrays.asList(TOKEN_TIMEOUT, TOKEN_ALIAS);
focal_class.type: List<String>
focal_class.var_name: POSSIBLE_TOKENS
focal_class.declarator: shell
focal_class.modifier: private final
focal_class.original_string: private final Groovysh shell;
focal_class.type: Groovysh
focal_class.var_name: shell
focal_class.file: gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/DriverRemoteAcceptor.java
focal_class.identifier: DriverRemoteAcceptor
focal_class.interfaces: implements RemoteAcceptor
focal_class.class_method_signature: DriverRemoteAcceptor.DriverRemoteAcceptor(final Groovysh shell)
focal_class.full_signature: public  DriverRemoteAcceptor(final Groovysh shell)
focal_class.identifier: DriverRemoteAcceptor
focal_class.modifiers: public
focal_class.parameters: (final Groovysh shell)
focal_class.signature:  DriverRemoteAcceptor(final Groovysh shell)
focal_class.class_method_signature: DriverRemoteAcceptor.connect(final List<String> args)
focal_class.full_signature: @Override public Object connect(final List<String> args)
focal_class.identifier: connect
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> args)
focal_class.return: Object
focal_class.signature: Object connect(final List<String> args)
focal_class.class_method_signature: DriverRemoteAcceptor.configure(final List<String> args)
focal_class.full_signature: @Override public Object configure(final List<String> args)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> args)
focal_class.return: Object
focal_class.signature: Object configure(final List<String> args)
focal_class.class_method_signature: DriverRemoteAcceptor.submit(final List<String> args)
focal_class.full_signature: @Override public Object submit(final List<String> args)
focal_class.identifier: submit
focal_class.modifiers: @Override public
focal_class.parameters: (final List<String> args)
focal_class.return: Object
focal_class.signature: Object submit(final List<String> args)
focal_class.class_method_signature: DriverRemoteAcceptor.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: DriverRemoteAcceptor.getTimeout()
focal_class.full_signature: public int getTimeout()
focal_class.identifier: getTimeout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTimeout()
focal_class.class_method_signature: DriverRemoteAcceptor.send(final String gremlin)
focal_class.full_signature: private List<Result> send(final String gremlin)
focal_class.identifier: send
focal_class.modifiers: private
focal_class.parameters: (final String gremlin)
focal_class.return: List<Result>
focal_class.signature: List<Result> send(final String gremlin)
focal_class.class_method_signature: DriverRemoteAcceptor.allowRemoteConsole()
focal_class.full_signature: @Override public boolean allowRemoteConsole()
focal_class.identifier: allowRemoteConsole
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean allowRemoteConsole()
focal_class.class_method_signature: DriverRemoteAcceptor.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: DriverRemoteAcceptor.findResponseException(final Throwable ex)
focal_class.full_signature: private Optional<ResponseException> findResponseException(final Throwable ex)
focal_class.identifier: findResponseException
focal_class.modifiers: private
focal_class.parameters: (final Throwable ex)
focal_class.return: Optional<ResponseException>
focal_class.signature: Optional<ResponseException> findResponseException(final Throwable ex)
focal_class.class_method_signature: DriverRemoteAcceptor.getSessionStringSegment()
focal_class.full_signature: private String getSessionStringSegment()
focal_class.identifier: getSessionStringSegment
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSessionStringSegment()
focal_method.body: @Override
      public Object connect(final List<String> args) throws RemoteException {
          if (args.size() < 1) throw new RemoteException("Expects the location of a configuration file as an argument");
  
          try {
              this.currentCluster = Cluster.open(args.get(0));
              final boolean useSession = args.size() >= 2 && (args.get(1).equals(TOKEN_SESSION) || args.get(1).equals(TOKEN_SESSION_MANAGED));
              if (useSession) {
                  final String sessionName = args.size() == 3 ? args.get(2) : UUID.randomUUID().toString();
                  session = Optional.of(sessionName);
  
                  final boolean managed = args.get(1).equals(TOKEN_SESSION_MANAGED);
  
                  this.currentClient = this.currentCluster.connect(sessionName, managed);
              } else {
                  this.currentClient = this.currentCluster.connect();
              }
              this.currentClient.init();
              return String.format("Configured %s", this.currentCluster) + getSessionStringSegment();
          } catch (final FileNotFoundException ignored) {
              throw new RemoteException("The 'connect' option must be accompanied by a valid configuration file");
          } catch (final Exception ex) {
              throw new RemoteException("Error during 'connect' - " + ex.getMessage(), ex);
          }
      }
focal_method.class_method_signature: DriverRemoteAcceptor.connect(final List<String> args)
focal_method.full_signature: @Override public Object connect(final List<String> args)
focal_method.identifier: connect
focal_method.invocations: size open get size equals get equals get size get toString randomUUID of equals get connect connect init format getSessionStringSegment getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (final List<String> args)
focal_method.return: Object
focal_method.signature: Object connect(final List<String> args)