69707172737475767778798081828384
@Override protected NexusClient getClient(final Variables vars) { assert vars != null; NexusClient client; // Close if a client already exists try { client = super.getClient(vars); client.close(); } catch (NexusClient.NotConnectedFailure e) { // ignore }
282930313233343536
{ public Object execute(final CommandContext context) throws Exception { assert context != null; Variables vars = context.getVariables(); NexusClient client = getClient(vars); return execute(context, client); }
3637383940414243444546
} protected NexusClient getClient(final Variables vars) { assert vars != null; NexusClient client = vars.get(NexusClient.class); if (client == null) { throw new NexusClient.NotConnectedFailure(); } return client; }