code: private static GatekeeperReply jmConnect(GSSCredential cred,
  					     GlobusURL jobURL,
  					     String msg)
  	throws GramException, GSSException {
  
  	GSSManager manager = ExtendedGSSManager.getInstance();
  
  	GatekeeperReply reply = null;
  	GssSocket socket = null;
  
  	try {
  
  	    ExtendedGSSContext context =
  		(ExtendedGSSContext)manager.createContext(null,
  							  GSSConstants.MECH_OID,
  							  cred,
  							  GSSContext.DEFAULT_LIFETIME);
  
  	    context.setOption(GSSConstants.GSS_MODE,
  			      GSIConstants.MODE_SSL);
  
  	    GssSocketFactory factory = GssSocketFactory.getDefault();
  
  	    socket = (GssSocket)factory.createSocket(jobURL.getHost(),
  						     jobURL.getPort(),
  						     context);
  
  	    socket.setAuthorization(SelfAuthorization.getInstance());
  
  	    OutputStream out = socket.getOutputStream();
  	    InputStream in   = socket.getInputStream();
  
  	    out.write(msg.getBytes());
  	    out.flush();
  
  	    debug("JM SENT:", msg);
  
  	    reply = new GatekeeperReply(in);
  
  	} catch(IOException e) {
  	    throw new GramException(GramException.ERROR_CONNECTION_FAILED, e);
  	} finally {
  	    if (socket != null) {
  		try { socket.close(); } catch (Exception e) {}
  	    }
  	}
  
  	debug("JM RECEIVED:", reply);
  
  	// must be 200 otherwise throw exception
  	checkHttpReply(reply.httpCode);
  
  	// protocol version must match
  	checkProtocolVersion(reply.protocolVersion);
  
  	return reply;
      }
docs: --------------------- JOB MANAGER CALLS --------------------------------